Merge pull request #40 from plieven/master
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 17 Dec 2013 14:34:23 +0000 (06:34 -0800)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 17 Dec 2013 14:34:23 +0000 (06:34 -0800)
minor fixes

lib/libnfs-zdr.c
lib/libnfs.c
libnfs.pc.in

index 21cd9e13fe5de2ca0c3f00aa3cf8399b9780b800..f5e1a11270291e191d526ce1703e1018061f2567 100644 (file)
@@ -476,10 +476,12 @@ struct AUTH *libnfs_authunix_create(char *host, uint32_t uid, uint32_t gid, uint
 
        size = 4 + 4 + ((strlen(host) + 3) & ~3) + 4 + 4 + 4 + len * 4;
        auth = malloc(sizeof(struct AUTH));
+       memset(auth, 0x00, sizeof(struct AUTH));
        auth->ah_cred.oa_flavor = AUTH_UNIX;
        auth->ah_cred.oa_length = size;
        auth->ah_cred.oa_base = malloc(size);
 
+       memset(auth->ah_cred.oa_base, 0x00, size);
        buf = (uint32_t *)auth->ah_cred.oa_base;
        idx = 0;
        buf[idx++] = htonl(time(NULL));
index 8a2f16fcc21419dcae10361cec7013722396fe2c..2e3e7f2d77e473bd6ccbee459bc442d316efce58 100644 (file)
@@ -1868,7 +1868,7 @@ static void nfs_creat_1_cb(struct rpc_context *rpc, int status, void *command_da
        if (res->status != NFS3_OK) {
                rpc_set_error(nfs->rpc, "NFS: CREATE of %s/%s failed with %s(%d)", data->saved_path, str, nfsstat3_to_str(res->status), nfsstat3_to_errno(res->status));
                data->cb(nfsstat3_to_errno(res->status), nfs, rpc_get_error(nfs->rpc), data->private_data);
-
+               free_nfs_cb_data(data);
                return;
        }
 
index e7e3a913bb94dab36af1a67c71321691b42c3931..fdc012c85aa4468eb59c9fa59585065c3cedad48 100644 (file)
@@ -12,4 +12,3 @@ Requires:
 Conflicts:
 Libs: -L${libdir} -lnfs
 Cflags: -I${includedir}
-Requires.private: @LIBNFS_PC_REQ_PRIVATE@