summaryrefslogtreecommitdiff
path: root/source3/printing
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-03-13 00:37:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:15:22 -0500
commit3b58c82a52c3a1298f867728adb16b9791479063 (patch)
tree84353dfa55e366a4b9e546c014519a2edc3d1a5f /source3/printing
parent30e751c56b684e027117bee1df9924477f55bc88 (diff)
downloadsamba-3b58c82a52c3a1298f867728adb16b9791479063.tar.gz
samba-3b58c82a52c3a1298f867728adb16b9791479063.tar.bz2
samba-3b58c82a52c3a1298f867728adb16b9791479063.zip
r14273: Fix coverity bug #202. Memory leak on error path.
Jeremy. (This used to be commit d2be8163f2cf69681150ed7de720a37ffaa8e937)
Diffstat (limited to 'source3/printing')
-rw-r--r--source3/printing/nt_printing.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 5f751bf110..91530fc82c 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -2804,8 +2804,10 @@ int get_printer_subkeys( NT_PRINTER_DATA *data, const char* key, fstring **subke
/* return error if the key was not found */
- if ( i == data->num_keys )
+ if ( i == data->num_keys ) {
+ SAFE_FREE(subkeys_ptr);
return -1;
+ }
done:
/* tag off the end */