1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-08 04:58:40 +03:00

r19665: Fix a memleak

(This used to be commit bc6d4e52806eb1ace282e983566660928214374c)
This commit is contained in:
Volker Lendecke 2006-11-11 16:50:38 +00:00 committed by Gerald (Jerry) Carter
parent 58406b0d1c
commit b6fda7f8bd

View File

@ -4573,7 +4573,7 @@ static int process_usershare_file(const char *dir_name, const char *file_name, i
/* Should we allow printers to be shared... ? */
ctx = talloc_init("usershare_sd_xctx");
if (!ctx) {
SAFE_FREE(lines);
file_lines_free(lines);
return 1;
}
@ -4581,11 +4581,11 @@ static int process_usershare_file(const char *dir_name, const char *file_name, i
iService, lines, numlines, sharepath,
comment, &psd, &guest_ok) != USERSHARE_OK) {
talloc_destroy(ctx);
SAFE_FREE(lines);
file_lines_free(lines);
return -1;
}
SAFE_FREE(lines);
file_lines_free(lines);
/* Everything ok - add the service possibly using a template. */
if (iService < 0) {