monit-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

coverity reported memory leak


From: rory toma
Subject: coverity reported memory leak
Date: Thu, 10 Feb 2005 13:08:17 -0800
User-agent: Mozilla Thunderbird 1.0 (Macintosh/20041206)

I'm out of ideas here... For some reason, tmp->from isn't being freed and I don't know why. This is in alert.c.

145  		Mail_T tmp;
146  	
147  		NEW(tmp);
148  	
Called allocation function "copy_mail" on "(tmp)->from" [model]
Also see events: [var_assign][leaked_storage]
149  		copy_mail(tmp, m_global);
150  	
At conditional (1): "Event_get_message != 0" taking true path
151  		if(Event_get_message(E))
152  		  tmp->opt_message= xstrdup(Event_get_message(E));
153  	
154  		substitute(&tmp, s->name, EVENT_DESCRIPTION(E),
155  	          EVENTACTION_DESCRIPTION(E));
156  	
157  		replace_bare_linefeed(&tmp);
158  	
159  		tmp->next= list;
Assigning "(tmp)->from" to "(list)->from"
Also see events: [alloc_arg][leaked_storage]
160  		list= tmp;
161  	
At conditional (2): "(Run).debug != 0" taking true path
162  		DEBUG("%s notification is sent to %s\n", EVENT_DESCRIPTION(E), m_global->to);
163  	
Freed "tmp" without freeing its field from [model]
Also see events: [alloc_arg][var_assign]
164  		gc_mail_list(&tmp);

-- 
Rory Toma		address@hidden
Senior Principal Lead Something or Other

reply via email to

[Prev in Thread] Current Thread [Next in Thread]