Fixed memory leak in WHOIS command reply.
authorPekka Riikonen <priikone@silcnet.org>
Tue, 15 Oct 2002 18:34:38 +0000 (18:34 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Tue, 15 Oct 2002 18:34:38 +0000 (18:34 +0000)
lib/silcclient/command_reply.c

index 41cc376c8158a536f702ef26938b38a7a3e9b78b..49e7dcd919551a66b66aa2f09f20cee607ef68c5 100644 (file)
@@ -243,8 +243,11 @@ silc_client_command_reply_whois_save(SilcClientCommandReplyContext cmd,
 
   /* Take Requested Attributes if set. */
   tmp = silc_argument_get_arg_type(cmd->args, 11, &len);
-  if (tmp)
+  if (tmp) {
+    if (client_entry->attrs)
+      silc_attribute_payload_list_free(client_entry->attrs);
     client_entry->attrs = silc_attribute_payload_parse(tmp, len);
+  }
 
   client_entry->status &= ~SILC_CLIENT_STATUS_RESOLVING;