nfs-ls: Fix crash when called with no arguments
authorAlex Snast <alexsn@il.ibm.com>
Sat, 19 Apr 2014 16:30:43 +0000 (19:30 +0300)
committerAlex Snast <alexsn@il.ibm.com>
Sat, 19 Apr 2014 16:35:49 +0000 (19:35 +0300)
When called with no argument we jump to 'finished' label
after which nfs_destroy_url is called with *url having
some garbage stack value.

utils/nfs-ls.c

index c680617effc5e1ee640b96cea114f1c56f70e2dd..974a6e16ec32fca2414d45cf43e0301293816e59 100644 (file)
@@ -172,7 +172,7 @@ int main(int argc, char *argv[])
        uint64_t offset;
        struct client client;
        struct statvfs stvfs;
-       struct nfs_url *url;
+       struct nfs_url *url = NULL;
        exports export, tmp;
 
 #ifdef WIN32