mirror of
https://github.com/samba-team/samba.git
synced 2025-03-22 02:50:28 +03:00
s4-registry: Don't leak memory on error.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
This commit is contained in:
parent
b055798c56
commit
66ee744ccb
@ -508,8 +508,15 @@ static char **reg_complete_key(const char *text, int start, int end)
|
||||
} else if(W_ERROR_EQUAL(status, WERR_NO_MORE_ITEMS)) {
|
||||
break;
|
||||
} else {
|
||||
int n;
|
||||
|
||||
printf("Error creating completion list: %s\n",
|
||||
win_errstr(status));
|
||||
|
||||
for (n = j; n >= 0; n--) {
|
||||
SAFE_FREE(matches[n]);
|
||||
}
|
||||
SAFE_FREE(matches);
|
||||
talloc_free(mem_ctx);
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user