nfs_parse_url: initialize memory
authorPeter Lieven <pl@kamp.de>
Thu, 26 Dec 2013 11:48:21 +0000 (12:48 +0100)
committerPeter Lieven <pl@kamp.de>
Thu, 26 Dec 2013 11:48:21 +0000 (12:48 +0100)
the urls struct was accidently left unitialized.

Signed-off-by: Peter Lieven <pl@kamp.de>
lib/libnfs.c

index 38da45c75732db7c960d43d6e8513d7b6dc7509f..4eb18512900c420aaeb279c9f2e24317e8977074 100644 (file)
@@ -201,6 +201,7 @@ static struct nfs_url *nfs_parse_url(struct nfs_context *nfs, const char *url, i
                return NULL;
        }
 
+       memset(urls, 0x00, sizeof(struct nfs_url));
        urls->server = strdup(url + 6);
        if (urls->server == NULL) {
                nfs_destroy_url(urls);