s3-net: Don't leak username.
authorAndreas Schneider <asn@samba.org>
Wed, 20 Feb 2013 08:03:17 +0000 (09:03 +0100)
committerAlexander Bokovoy <ab@samba.org>
Fri, 22 Feb 2013 15:36:13 +0000 (16:36 +0100)
Reviewed-by: Alexander Bokovoy <ab@samba.org>
source3/utils/net_rpc.c

index c112a15e7635c6df5d431a82fc26e19a5e7ffabf..870ad2287f2a9878a0d31b5cec92756f5913e615 100644 (file)
@@ -5372,7 +5372,7 @@ static int rpc_file_user(struct net_context *c, int argc, const char **argv)
 {
        NET_API_STATUS status;
        uint32 preferred_len = 0xffffffff, i;
-       const char *username=NULL;
+       char *username=NULL;
        uint32_t total_entries = 0;
        uint32_t entries_read = 0;
        uint32_t resume_handle = 0;
@@ -5411,6 +5411,7 @@ static int rpc_file_user(struct net_context *c, int argc, const char **argv)
                display_file_info_3(&i3[i]);
        }
  done:
+       SAFE_FREE(username);
        return status;
 }