diff options
author | Jeremy Allison <jra@samba.org> | 2000-09-11 23:21:16 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-09-11 23:21:16 +0000 |
commit | 692fe0cabfaf4b0e13083aa5d6fc9dddb4e5dd5b (patch) | |
tree | 8a653ed2b1d5e238ea32039047b60df73aaacfea | |
parent | 0b2e454703fc59b9c019fb8bded92cbc78432567 (diff) | |
download | samba-692fe0cabfaf4b0e13083aa5d6fc9dddb4e5dd5b.tar.gz samba-692fe0cabfaf4b0e13083aa5d6fc9dddb4e5dd5b.tar.bz2 samba-692fe0cabfaf4b0e13083aa5d6fc9dddb4e5dd5b.zip |
Fix for malloc of zero bytes found by insure.
Jeremy.
(This used to be commit 2916790859acc56e582056774b02d4a33cedeaa4)
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 2c0dc79fb2..da5b3e960f 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -3564,6 +3564,11 @@ uint32 _spoolss_enumjobs( POLICY_HND *handle, uint32 firstjob, uint32 numofjobs, *returned = print_queue_status(snum, &queue, &prt_status); DEBUGADD(4,("count:[%d], status:[%d], [%s]\n", *returned, prt_status.status, prt_status.message)); + if (*returned == 0) { + safe_free(queue); + return NT_STATUS_NO_PROBLEMO; + } + switch (level) { case 1: return enumjobs_level1(queue, snum, buffer, offered, needed, returned); |