diff options
author | Jeremy Allison <jra@samba.org> | 2006-06-20 19:06:57 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:18:52 -0500 |
commit | 4fbeae1a3ac3499e5d9f566655cbafccd9d691cb (patch) | |
tree | 7aa5fdc61de8dc53263334417d5209a14ff9b479 /source/printing | |
parent | e83c3e0a65edeb423d964488e219e30d023b13e8 (diff) | |
download | samba-4fbeae1a3ac3499e5d9f566655cbafccd9d691cb.tar.gz samba-4fbeae1a3ac3499e5d9f566655cbafccd9d691cb.tar.xz samba-4fbeae1a3ac3499e5d9f566655cbafccd9d691cb.zip |
r16424: Fix possible null deref and a memory leak found by
examining Klockwork #1519. get_printer_subkeys()
could return zero without initializing it's return
pointer arg. Fixed this. Added free of subkey pointer
return in registry/reg_printing.c (interesting that
neithe Coverity or Klocwork found this one).
Jeremy.
Diffstat (limited to 'source/printing')
-rw-r--r-- | source/printing/nt_printing.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index 6a7fd4d3986..5c4039722e1 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -2767,6 +2767,8 @@ int get_printer_subkeys( NT_PRINTER_DATA *data, const char* key, fstring **subke fstring *subkeys_ptr = NULL; fstring subkeyname; + *subkeys = NULL; + if ( !data ) return 0; |