libcli/raw: give the caller the chance to prevent the talloc_free(req) in the _recv...
[metze/samba/wip.git] / source / libcli / raw / rawrequest.c
index a0e6452748e0f0a4bb0c4056061597aa34423d8a..dd9b1f3e963c76014534a332398c7bcf148ce96c 100644 (file)
@@ -72,7 +72,11 @@ _PUBLIC_ NTSTATUS smbcli_request_destroy(struct smbcli_request *req)
        }
 
        status = req->status;
-       talloc_free(req);
+
+       if (!req->do_not_free) {
+               talloc_free(req);
+       }
+
        return status;
 }