Skip to content

Commit

Permalink
Low: libcrmservices: Don't leak msg if systemd_proxy is NULL.
Browse files Browse the repository at this point in the history
  • Loading branch information
clumens committed Feb 5, 2025
1 parent 96e9bff commit 51a93e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/services/systemd.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,15 @@ systemd_send_recv(DBusMessage *msg, DBusError *error, int timeout)
static DBusMessage *
systemd_call_simple_method(const char *method)
{
DBusMessage *msg = systemd_new_method(method);
DBusMessage *msg = NULL;
DBusMessage *reply = NULL;
DBusError error;

/* Don't call systemd_init() here, because that calls this */
CRM_CHECK(systemd_proxy, return NULL);

msg = systemd_new_method(method);

if (msg == NULL) {
crm_err("Could not create message to send %s to systemd", method);
return NULL;
Expand Down

0 comments on commit 51a93e7

Please sign in to comment.