Text  |   XML   |   Visible Warnings:

irssi-0.8.14 : irssi-0.8.14 analysis 2 : Null Test After Dereference  at servers.c:616

Categories: LANG.STRUCT.NTAD
Warning ID: 4757.28227
Procedure: server_connect_unref
Trace: view
Modified: Thu Nov 26 11:08:11 2009   show details
 
Priority: None
State: None
Finding: None
Owner: None
  edit properties

Legend [ X ]
Warning Location
Contributes
Parse Error
Other Warning
Two or More Loop Iterations
On Execution Path
Comment
Macro
Preprocessor
Include
Keyword
Preprocessed Away

Source  |  Language: C Hide Legend     
LineSource
  /kat0/fletcher/SATE/2010/irssi-0.8.14/src/core/servers.c
  Enter server_connect_unref
605 void server_connect_unref(SERVER_CONNECT_REC *conn) 
606 {
607         g_return_if_fail(IS_SERVER_CONNECT(conn));
608  
609         if (--conn->refcount > 0)
610                 return;
611         if (conn->refcount < 0) {
612                 g_warning("Connection '%s' refcount = %d",
613                           conn->tag, conn->refcount);
614         }
615  
616         CHAT_PROTOCOL(conn)->destroy_server_connect(conn);     /* Null Test After Dereference */
617  
618         if (conn->connect_handle != NULL)
619                 net_disconnect(conn->connect_handle);
620  
621         g_free_not_null(conn->proxy);
622         g_free_not_null(conn->proxy_string);
623         g_free_not_null(conn->proxy_string_after);
624         g_free_not_null(conn->proxy_password);
625  
626         g_free_not_null(conn->tag);
627         g_free_not_null(conn->address);
628         g_free_not_null(conn->chatnet);
629  
630         g_free_not_null(conn->own_ip4);
631         g_free_not_null(conn->own_ip6);
632  
633         g_free_not_null(conn->password);
634         g_free_not_null(conn->nick);
635         g_free_not_null(conn->username);
636         g_free_not_null(conn->realname);
637  
638         g_free_not_null(conn->ssl_cert);
639         g_free_not_null(conn->ssl_pkey);
640         g_free_not_null(conn->ssl_cafile);
641         g_free_not_null(conn->ssl_capath);
642  
643         g_free_not_null(conn->channels);
644         g_free_not_null(conn->away_reason);
645  
646         conn->type = 0;
647         g_free(conn);
648 } 




Change Warning 4757.28227 : Null Test After Dereference

Priority:
State:
Finding:
Owner:
Note: