Merge lp:~linuxjedi/libdrizzle/5.1-valgrind-fixes into lp:libdrizzle

Proposed by Andrew Hutchings
Status: Merged
Approved by: Andrew Hutchings
Approved revision: 65
Merged at revision: 65
Proposed branch: lp:~linuxjedi/libdrizzle/5.1-valgrind-fixes
Merge into: lp:libdrizzle
Diff against target: 83 lines (+19/-4)
5 files modified
.bzrignore (+1/-1)
libdrizzle/result.cc (+11/-2)
libdrizzle/statement.cc (+5/-1)
tests/unit/column.c (+1/-0)
tests/unit/row.c (+1/-0)
To merge this branch: bzr merge lp:~linuxjedi/libdrizzle/5.1-valgrind-fixes
Reviewer Review Type Date Requested Status
Andrew Hutchings Approve
Review via email: mp+141396@code.launchpad.net

Description of the change

Fix valgrind leaks and errors

To post a comment you must log in.
Revision history for this message
Andrew Hutchings (linuxjedi) wrote :

needs merging to fix Jenkins failures

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '.bzrignore'
--- .bzrignore 2012-12-21 13:17:29 +0000
+++ .bzrignore 2012-12-28 10:40:32 +0000
@@ -29,7 +29,7 @@
29libdrizzle/.libs/29libdrizzle/.libs/
30libdrizzle/*.la30libdrizzle/*.la
31libdrizzle/*.lo31libdrizzle/*.lo
32libdrizzle-5.0/version.h32libdrizzle-*/version.h
33m4/libtool.m433m4/libtool.m4
34m4/ltoptions.m434m4/ltoptions.m4
35m4/ltsugar.m435m4/ltsugar.m4
3636
=== modified file 'libdrizzle/result.cc'
--- libdrizzle/result.cc 2012-12-23 01:05:57 +0000
+++ libdrizzle/result.cc 2012-12-28 10:40:32 +0000
@@ -90,6 +90,8 @@
90 result->info[0]= '\0';90 result->info[0]= '\0';
91 result->sqlstate[0]= '\0';91 result->sqlstate[0]= '\0';
92 result->null_bitmap_list= NULL;92 result->null_bitmap_list= NULL;
93 result->null_bitmap= NULL;
94 result->binary_rows= false;
9395
94 result->con= con;96 result->con= con;
95 con->result= result;97 con->result= result;
@@ -131,8 +133,15 @@
131 for (x= 0; x < result->row_count; x++)133 for (x= 0; x < result->row_count; x++)
132 {134 {
133 drizzle_row_free(result, result->row_list[x]);135 drizzle_row_free(result, result->row_list[x]);
134 }136 if (result->null_bitmap_list != NULL)
135137 {
138 free(result->null_bitmap_list[x]);
139 }
140 }
141 if (result->null_bitmap_list != NULL)
142 {
143 free(result->null_bitmap_list);
144 }
136 free(result->row_list);145 free(result->row_list);
137 free(result->field_sizes_list);146 free(result->field_sizes_list);
138 }147 }
139148
=== modified file 'libdrizzle/statement.cc'
--- libdrizzle/statement.cc 2012-12-23 10:47:57 +0000
+++ libdrizzle/statement.cc 2012-12-28 10:40:32 +0000
@@ -567,7 +567,11 @@
567567
568 free(stmt->null_bitmap);568 free(stmt->null_bitmap);
569 free(stmt->query_params);569 free(stmt->query_params);
570 free(stmt->result_params);570 if (stmt->result_params)
571 {
572 free(stmt->result_params->data);
573 free(stmt->result_params);
574 }
571 if (stmt->execute_result)575 if (stmt->execute_result)
572 {576 {
573 drizzle_result_free(stmt->execute_result);577 drizzle_result_free(stmt->execute_result);
574578
=== modified file 'tests/unit/column.c'
--- tests/unit/column.c 2012-12-27 07:49:01 +0000
+++ tests/unit/column.c 2012-12-28 10:40:32 +0000
@@ -64,6 +64,7 @@
64 if (ret != DRIZZLE_RETURN_OK)64 if (ret != DRIZZLE_RETURN_OK)
65 {65 {
66 printf("Drizzle connection failure\n");66 printf("Drizzle connection failure\n");
67 drizzle_quit(con);
67 return EXIT_SKIP;68 return EXIT_SKIP;
68 }69 }
6970
7071
=== modified file 'tests/unit/row.c'
--- tests/unit/row.c 2012-12-27 22:09:42 +0000
+++ tests/unit/row.c 2012-12-28 10:40:32 +0000
@@ -64,6 +64,7 @@
64 if (ret != DRIZZLE_RETURN_OK)64 if (ret != DRIZZLE_RETURN_OK)
65 {65 {
66 printf("Drizzle connection failure\n");66 printf("Drizzle connection failure\n");
67 drizzle_quit(con);
67 return EXIT_SKIP;68 return EXIT_SKIP;
68 }69 }
6970

Subscribers

People subscribed via source and target branches

to all changes:
to status/vote changes: