diff options
author | Jeremy Allison <jra@samba.org> | 2002-12-04 21:28:23 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-12-04 21:28:23 +0000 |
commit | cf7f1d5de0b8a6e6af8b91fe82034a83030da656 (patch) | |
tree | fa11b03ff979d47d62e73de394b9d8e2ed84730e | |
parent | 4ba89367078d4847ebbd8023fb361cfbfc472527 (diff) | |
download | samba-cf7f1d5de0b8a6e6af8b91fe82034a83030da656.tar.gz samba-cf7f1d5de0b8a6e6af8b91fe82034a83030da656.tar.bz2 samba-cf7f1d5de0b8a6e6af8b91fe82034a83030da656.zip |
Janitor for tpot yet again... Merging in memory leak fix.
Jeremy.
(This used to be commit a2ab78d68d269e77d55bf4b6929cf512a28f0708)
-rw-r--r-- | source3/printing/nt_printing.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index e37238c2ce..00d1eaacd3 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -2830,6 +2830,7 @@ static int unpack_values(NT_PRINTER_DATA *printer_data, char *buf, int buflen) regval_ctr_addvalue( &printer_data->keys[key_index].values, valuename, type, data_p, size ); + SAFE_FREE(data_p); /* 'B' option to tdb_unpack does a malloc() */ DEBUG(8,("specific: [%s:%s], len: %d\n", keyname, valuename, size)); } @@ -4382,9 +4383,8 @@ BOOL nt_printing_getsec(TALLOC_CTX *ctx, const char *printername, SEC_DESC_BUF * fstring key; char *temp; - if ((temp = strchr(printername + 2, '\\'))) { + if (strlen(printername) > 2 && (temp = strchr(printername + 2, '\\'))) printername = temp + 1; - } /* Fetch security descriptor from tdb */ |