jrossi / issue-migration-test

GNU General Public License v2.0
1 stars 0 forks source link

use of uninitialised value and memleak #22

Closed jrossi closed 10 years ago

jrossi commented 10 years ago

Hi, can you initialise log_size in src/shared/read-alert.c line 163 with 0. And can you free alerid with "if(alertid) free(alertid); alertid = NULL; }" at the end of GetAlertData in line 574, cause it may not freed on last loop iteration.

Note: This issue has been automatically migrated from Bitbucket Created by cgzones on 2012-09-20 21:14:42+00:00, last updated: 2012-10-05 09:25:29+00:00

jrossi commented 10 years ago

fixed with commit 4b3874263136

Note: This comment has been automatically migrated from Bitbucket Created by jbcheng on 2012-09-21 21:45:54+00:00

jrossi commented 10 years ago

hi, again thanks for quick response. but i think the problem is not solved: alertid is realloc'ed in line 264, but it can be that in the last loop iteration a continue; is triggered and so the l_error label is not executed. so a last "if(alertid) free(alertid); alertid = NULL; }" after line 578 was my intention.

Note: This comment has been automatically migrated from Bitbucket Created by cgzones on 2012-09-21 22:03:16+00:00