1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-24 15:33:20 +03:00

ntquotas: support "freeing" an empty quota list

This avoids dereferencing a null pointer if there's
an attempt to free an empty list.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12307

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Uri Simchoni
2016-09-18 11:09:54 +03:00
committed by Jeremy Allison
parent 610c26d74c
commit dd8a0578d8
2 changed files with 3 additions and 3 deletions

View File

@@ -34,8 +34,9 @@ NTSTATUS cli_get_quota_handle(struct cli_state *cli, uint16_t *quota_fnum)
void free_ntquota_list(SMB_NTQUOTA_LIST **qt_list)
{
if (!qt_list)
if (!qt_list || !*qt_list) {
return;
}
if ((*qt_list)->mem_ctx)
talloc_destroy((*qt_list)->mem_ctx);