diff options
| author | dequis <dx@dxzone.com.ar> | 2015-10-08 04:48:06 -0300 | 
|---|---|---|
| committer | dequis <dx@dxzone.com.ar> | 2015-10-08 23:41:01 -0300 | 
| commit | bbff22d5c2f3a7cef28bd57c7a73379b0c5d2623 (patch) | |
| tree | f2141e656c810378a80e13db510eaded4a3b346f /protocols/twitter/twitter.c | |
| parent | c4e61db186c2e0916e43a1ffc85afe5997aaf345 (diff) | |
twitter: Fix some nitpicky issues reported by coverity
Mostly minor rare leaks that happen in error conditions, and one
dereference before null check in twitter_logout (the null check is
probably the wrong one there, but it doesn't hurt to keep it)
Diffstat (limited to 'protocols/twitter/twitter.c')
| -rw-r--r-- | protocols/twitter/twitter.c | 12 | 
1 files changed, 6 insertions, 6 deletions
| diff --git a/protocols/twitter/twitter.c b/protocols/twitter/twitter.c index b619b1e5..a8103cca 100644 --- a/protocols/twitter/twitter.c +++ b/protocols/twitter/twitter.c @@ -677,14 +677,14 @@ static void twitter_logout(struct im_connection *ic)  	// Set the status to logged out.  	ic->flags &= ~OPT_LOGGED_IN; -	// Remove the main_loop function from the function queue. -	b_event_remove(td->main_loop_id); +	if (td) { +		// Remove the main_loop function from the function queue. +		b_event_remove(td->main_loop_id); -	if (td->timeline_gc) { -		imcb_chat_free(td->timeline_gc); -	} +		if (td->timeline_gc) { +			imcb_chat_free(td->timeline_gc); +		} -	if (td) {  		if (td->filter_update_id > 0) {  			b_event_remove(td->filter_update_id);  		} | 
