nfs_lookuppath_async: plug potential memleak
[deb_libnfs.git] / lib / libnfs.c
index 61cb29f6c1cc8f3eaf575aabb098f2fd89916020..6e7cd214a3fefa3d47244048c1fc0db2c19cc674 100644 (file)
@@ -1105,6 +1105,8 @@ static int nfs_lookuppath_async(struct nfs_context *nfs, const char *path, nfs_c
        if (data == NULL) {
                rpc_set_error(nfs->rpc, "out of memory: failed to allocate "
                        "nfs_cb_data structure");
+               if (free_continue_data)
+                       free_continue_data(continue_data);
                return -1;
        }
        memset(data, 0, sizeof(struct nfs_cb_data));