summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 */