[network-manager-openvpn] service: fix initialization of pid_data
- From: Beniamino Galvani <bgalvani src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openvpn] service: fix initialization of pid_data
- Date: Fri, 11 May 2018 16:23:56 +0000 (UTC)
commit 0f4ae722034df25139434ae40de322803a2753a7
Author: Beniamino Galvani <bgalvani redhat com>
Date: Thu May 10 00:02:31 2018 +0200
service: fix initialization of pid_data
The struct field 'is_terminating' is left uninitialized and this makes
pids_pending_send_sigterm() randomly ignore the openvpn process.
Fixes: c303f0d1599e6ae11b2c6ae0c10e4467ffd618d8
https://bugzilla.gnome.org/show_bug.cgi?id=795858
src/nm-openvpn-service.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/nm-openvpn-service.c b/src/nm-openvpn-service.c
index 79de8ed..7a04258 100644
--- a/src/nm-openvpn-service.c
+++ b/src/nm-openvpn-service.c
@@ -667,9 +667,8 @@ pids_pending_add (GPid pid, NMOpenvpnPlugin *plugin)
_LOGI ("openvpn[%ld] started", (long) pid);
- pid_data = g_slice_new (PidsPendingData);
+ pid_data = g_slice_new0 (PidsPendingData);
pid_data->pid = pid;
- pid_data->kill_id = 0;
pid_data->watch_id = g_child_watch_add (pid, pids_pending_child_watch_cb, pid_data);
pid_data->plugin = plugin;
g_object_add_weak_pointer ((GObject *) plugin, (gpointer *) &pid_data->plugin);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]