summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Untz <vuntz@novell.com>2010-02-19 16:43:17 +0100
committerVincent Untz <vuntz@novell.com>2010-02-19 16:43:17 +0100
commitfcf31c0d64cc68960cba25ea2733cbb40525a491 (patch)
tree81beba84e451b8e0f055c570659da80cac706810
parent1d5ead9e5d3fbfc11bd9b0849cb94f063e6604b5 (diff)
Plug leaks
-rw-r--r--src/cups-pk-helper-mechanism.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/cups-pk-helper-mechanism.c b/src/cups-pk-helper-mechanism.c
index 738e791..eee5735 100644
--- a/src/cups-pk-helper-mechanism.c
+++ b/src/cups-pk-helper-mechanism.c
@@ -1003,24 +1003,25 @@ cph_mechanism_job_cancel_purge (CphMechanism *mechanism,
"job-not-owned-edit",
"job-edit",
NULL))
- return;
+ goto out;
break;
}
case CPH_JOB_STATUS_NOT_OWNED_BY_USER: {
if (!_check_polkit_for_action (mechanism, context,
"job-not-owned-edit"))
- return;
+ goto out;
break;
}
case CPH_JOB_STATUS_INVALID: {
_cph_mechanism_return_error (mechanism, context, TRUE);
- return;
+ goto out;
}
}
ret = cph_cups_job_cancel (mechanism->priv->cups, id, purge, user_name);
_cph_mechanism_return_error (mechanism, context, !ret);
+out:
g_free (user_name);
}
@@ -1045,24 +1046,25 @@ cph_mechanism_job_restart (CphMechanism *mechanism,
"job-not-owned-edit",
"job-edit",
NULL))
- return;
+ goto out;
break;
}
case CPH_JOB_STATUS_NOT_OWNED_BY_USER: {
if (!_check_polkit_for_action (mechanism, context,
"job-not-owned-edit"))
- return;
+ goto out;
break;
}
case CPH_JOB_STATUS_INVALID: {
_cph_mechanism_return_error (mechanism, context, TRUE);
- return;
+ goto out;
}
}
ret = cph_cups_job_restart (mechanism->priv->cups, id, user_name);
_cph_mechanism_return_error (mechanism, context, !ret);
+out:
g_free (user_name);
}
@@ -1088,23 +1090,24 @@ cph_mechanism_job_set_hold_until (CphMechanism *mechanism,
"job-not-owned-edit",
"job-edit",
NULL))
- return;
+ goto out;
break;
}
case CPH_JOB_STATUS_NOT_OWNED_BY_USER: {
if (!_check_polkit_for_action (mechanism, context,
"job-not-owned-edit"))
- return;
+ goto out;
break;
}
case CPH_JOB_STATUS_INVALID: {
_cph_mechanism_return_error (mechanism, context, TRUE);
- return;
+ goto out;
}
}
ret = cph_cups_job_set_hold_until (mechanism->priv->cups, id, job_hold_until, user_name);
_cph_mechanism_return_error (mechanism, context, !ret);
+out:
g_free (user_name);
}