On 07/21/2010 03:11 PM, Michal Toman wrote:
Re-fixed :)
On 07/21/2010 14:40, Michal Toman wrote:
> fixed
>
> On 07/21/2010 14:19, Nikola Pajkovsky wrote:
>> On 07/21/2010 12:23 PM, Michal Toman wrote:
>>> Please review.
>>> Backtrace is only displayed if --backtrace option is specified.
>>>
>>>
>>
>> + const char *timestr = get_crash_data_item_content(crash,
>> FILENAME_TIME).c_str();
>> + static char *timeloc = localize_crash_time(timestr);
>>
>> const not static, timeloc leaking
>>
>> +static void print_crash_info(const map_crash_data_t& crash, bool
>> show_backtrace){
>> + const char *timestr = get_crash_data_item_content(crash,
>> FILENAME_TIME).c_str();
>> + const char *timeloc = localize_crash_time(timestr);
>>
>> ditto
>>
>>
and once more time
if (exitcode == ENOENT)
error_msg_and_die("Crash '%s' not found",
crash_id);
+
+ free((void *)crash_id);
this won't work when exitcode is -1, because error_msg_and_die calls exit() so you
will be still leaking
if (exitcode == ENOENT)
{
error_msg("Crash '%s' not found", crash_id);
free((void *)crash_id);
xfunc_die();
}
free((void *)crash_id);