Fixed double frees.
authorPekka Riikonen <priikone@silcnet.org>
Sun, 24 Nov 2002 19:13:47 +0000 (19:13 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sun, 24 Nov 2002 19:13:47 +0000 (19:13 +0000)
lib/silcclient/client_notify.c

index 4517aab10517b67e5332bdecc675a3195ad89637..50d5c562e6d1a35da4860ad7d6ce07fba7cfdcc3 100644 (file)
@@ -572,6 +572,7 @@ void silc_client_notify_by_server(SilcClient client,
     if (!client_entry)
       goto out;
     silc_free(client_id);
+    client_id = NULL;
 
     /* Wait for resolving if necessary */
     if (client_entry->status & SILC_CLIENT_STATUS_RESOLVING) {
@@ -1023,6 +1024,7 @@ void silc_client_notify_by_server(SilcClient client,
       goto out;
 
     silc_free(channel_id);
+    channel_id = NULL;
 
     /* Get the new ID */
     tmp = silc_argument_get_arg_type(args, 2, &tmp_len);
@@ -1157,6 +1159,7 @@ void silc_client_notify_by_server(SilcClient client,
       tmp = silc_argument_get_arg_type(args, 3, &tmp_len);
       if (tmp) {
        silc_free(client_id);
+       client_id = NULL;
        id = silc_id_payload_parse_id(tmp, tmp_len, &id_type);
        if (!id)
          goto out;