nfs_creat1_cb: fix memleak
authorPeter Lieven <pl@kamp.de>
Tue, 17 Dec 2013 10:50:00 +0000 (11:50 +0100)
committerPeter Lieven <pl@kamp.de>
Tue, 17 Dec 2013 10:50:00 +0000 (11:50 +0100)
data is not freed in case of a failure.

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

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;
        }