[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-26-g271d09f

Jeremy Allison jra at samba.org
Sat Jun 20 00:21:17 GMT 2009


The branch, master has been updated
       via  271d09f5992bdfe1eba6cfb39563cc899eeda178 (commit)
      from  d9eb1d9764a27ae63c8d7f13d7f4148fd1833753 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 271d09f5992bdfe1eba6cfb39563cc899eeda178
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Jun 19 17:20:00 2009 -0700

    Fix coverity #740. Resource leak in error paths. We should
    always return queue here as the caller will free.
    Jeremy.

-----------------------------------------------------------------------

Summary of changes:
 source3/printing/print_cups.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/printing/print_cups.c b/source3/printing/print_cups.c
index 18f4213..7d8248e 100644
--- a/source3/printing/print_cups.c
+++ b/source3/printing/print_cups.c
@@ -1342,14 +1342,12 @@ static int cups_queue_get(const char *sharename,
 	if ((response = cupsDoRequest(http, request, "/")) == NULL) {
 		DEBUG(0,("Unable to get printer status for %s - %s\n", printername,
 			 ippErrorString(cupsLastError())));
-		*q = queue;
 		goto out;
 	}
 
 	if (response->request.status.status_code >= IPP_OK_CONFLICT) {
 		DEBUG(0,("Unable to get printer status for %s - %s\n", printername,
 			 ippErrorString(response->request.status.status_code)));
-		*q = queue;
 		goto out;
 	}
 
@@ -1377,13 +1375,14 @@ static int cups_queue_get(const char *sharename,
 	        fstrcpy(status->message, msg);
 	}
 
+ out:
+
        /*
         * Return the job queue...
 	*/
 
 	*q = queue;
 
- out:
 	if (response)
 		ippDelete(response);
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list