No to check for NULL pointers with g_free

This commit is contained in:
Marcel Holtmann 2010-04-15 04:42:03 -07:00
parent 60643ee287
commit 123b87de2c
1 changed files with 2 additions and 4 deletions

View File

@ -701,8 +701,7 @@ static void server_destroy(gpointer user)
{
struct sock_server *data = user;
if (data)
g_free(data);
g_free(data);
}
static void set_raw_mode(int fd)
@ -780,8 +779,7 @@ static gboolean on_socket_connected(GIOChannel *chan, GIOCondition cond,
return TRUE;
error:
if (data)
g_free(data);
g_free(data);
return FALSE;
}