From 3b58c82a52c3a1298f867728adb16b9791479063 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 13 Mar 2006 00:37:57 +0000 Subject: r14273: Fix coverity bug #202. Memory leak on error path. Jeremy. (This used to be commit d2be8163f2cf69681150ed7de720a37ffaa8e937) --- source3/printing/nt_printing.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source3') 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 */ -- cgit