From f11640235bd13697c96b50ca18d9d239b2cfbd11 Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Fri, 3 Aug 2012 15:30:12 +0000 Subject: [Author: mmentovai] Fix error-case memory leak in GTMSMJobRemove. GTMPerformOnLabel will create an error in &local_error when it returns NULL, so there is no need to create yet another error in local_error. It masks the error created by GTMPerformOnLabel, which is leaked. R=dmaclach,thomasvl APPROVED=thomasvl DELTA=2 (0 added, 2 deleted, 0 changed) --- Foundation/GTMServiceManagement.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'Foundation/GTMServiceManagement.c') diff --git a/Foundation/GTMServiceManagement.c b/Foundation/GTMServiceManagement.c index 13bec32..efdc68e 100644 --- a/Foundation/GTMServiceManagement.c +++ b/Foundation/GTMServiceManagement.c @@ -663,8 +663,6 @@ Boolean GTMSMJobRemove(CFStringRef jobLabel, CFErrorRef *error) { break; } launch_data_free(resp); - } else { - local_error = GTMCFLaunchCreateUnlocalizedError(errno, CFSTR("")); } if (error) { *error = local_error; -- cgit v1.2.3