Commit 3414821
Bug #56709: Memory leaks at running the 5.1 test suite
Fixed a number of memory leaks discovered by valgrind.
--BZR--
revision-id: [email protected]
property-branch-nick: mysql-5.1-bugteam
property-file-info: ld7:file_id59:sp1f-dbug.c-19700101030959-dmu3qmh72hbptp5opqnmfgjtfckxi5ug7:message327:This is actually an addendum to the fix for bug #52629:
property-file-info:
property-file-info: - there is no point in limiting the fix to just global
property-file-info: variables, session ones are also affected.
property-file-info: - zero all fields when allocating a new 'state' structure so
property-file-info: that FreeState() does not deal with unitialized data later.
property-file-info: - add a check for a NULL pointer in DBUGCloseFile()4:path11:dbug/dbug.ced7:file_id73:sp1f-partition_error.resu-20050720124221-iacosg62tkflqhizuvhtiem5oeicwjit7:message33:Added a test case for bug #56709.4:path35:mysql-test/r/partition_error.resulted7:file_id73:sp1f-variables_debug.resu-20080226150357-xrpcjxbbb6lhnyicksx3a7ozn3i5wh5x7:message33:Added a test case for bug #56709.4:path35:mysql-test/r/variables_debug.resulted7:file_id73:sp1f-partition_error.test-20050720124214-od2aou4vzloggrqktgmbjzvuhajiukpm7:message33:Added a test case for bug #56709.4:path33:mysql-test/t/partition_error.tested7:file_id73:sp1f-variables_debug.test-20080226150357-odgq22hsyfmfw7na43dwgeuppys77opf7:message33:Added a test case for bug #56709.4:path33:mysql-test/t/variables_debug.tested7:file_id69:sp1f-item_timefunc.cc-19700101030959-rvvlgmw5b4ewpuuxuntrkiqimyrr5sw27:message228:There is no point in declaring 'value' as a member of
property-file-info: Item_extract and dynamically allocating memory for it in
property-file-info: Item_extract::fix_length_and_dec(), since this string is only
property-file-info: used as a temporary storage in Item_extract::val_int().4:path20:sql/item_timefunc.cced7:file_id68:sp1f-item_timefunc.h-19700101030959-o34ypz6ggolzqmhgsjnqh6inkvgugi467:message55:Removed 'value' from the Item_extract class definition.4:path19:sql/item_timefunc.hed7:file_id64:sp1f-sql_load.cc-19700101030959-hoqlay5we4yslrw23xqedulkejw6a3o57:message304:- we may need to deallocate 'buffer' even when 'error' is
property-file-info: non-zero in some cases, since 'error' is public, and there is
property-file-info: external code modifying it.
property-file-info: - assign NULL to buffer when deallocating it so that we don't
property-file-info: do it twice in the destructor
property-file-info: - there is no point in changing 'error' in the destructor.4:path15:sql/sql_load.ccee
testament3-sha1: aa5155cc8277df99850a4e80743c5ae7c98ea68c1 parent 23cd545 commit 3414821
File tree
8 files changed
+61
-19
lines changed- dbug
- mysql-test
- r
- t
- sql
8 files changed
+61
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
| 458 | + | |
| 459 | + | |
465 | 460 | | |
466 | 461 | | |
467 | 462 | | |
| |||
1447 | 1442 | | |
1448 | 1443 | | |
1449 | 1444 | | |
| 1445 | + | |
1450 | 1446 | | |
1451 | | - | |
1452 | 1447 | | |
1453 | 1448 | | |
1454 | 1449 | | |
| |||
1957 | 1952 | | |
1958 | 1953 | | |
1959 | 1954 | | |
1960 | | - | |
| 1955 | + | |
1961 | 1956 | | |
1962 | 1957 | | |
1963 | 1958 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1008 | 1008 | | |
1009 | 1009 | | |
1010 | 1010 | | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
1011 | 1021 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
27 | 40 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1252 | 1252 | | |
1253 | 1253 | | |
1254 | 1254 | | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
1255 | 1269 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
28 | 41 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2270 | 2270 | | |
2271 | 2271 | | |
2272 | 2272 | | |
2273 | | - | |
2274 | | - | |
2275 | 2273 | | |
2276 | 2274 | | |
2277 | 2275 | | |
| |||
2314 | 2312 | | |
2315 | 2313 | | |
2316 | 2314 | | |
| 2315 | + | |
| 2316 | + | |
2317 | 2317 | | |
2318 | 2318 | | |
2319 | 2319 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
702 | 702 | | |
703 | 703 | | |
704 | 704 | | |
705 | | - | |
706 | 705 | | |
707 | 706 | | |
708 | 707 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1116 | 1116 | | |
1117 | 1117 | | |
1118 | 1118 | | |
| 1119 | + | |
1119 | 1120 | | |
1120 | 1121 | | |
1121 | 1122 | | |
| |||
1142 | 1143 | | |
1143 | 1144 | | |
1144 | 1145 | | |
1145 | | - | |
1146 | | - | |
1147 | | - | |
1148 | | - | |
1149 | | - | |
1150 | | - | |
1151 | | - | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
1152 | 1150 | | |
1153 | 1151 | | |
1154 | 1152 | | |
| |||
0 commit comments