From 2eeb13d81e82ce47e76290c75ab3dfedb768f563 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Mon, 6 Mar 2017 17:47:27 +0100 Subject: [PATCH] device: add check for NULL connection diff in check_and_reapply_connection() Fixes: 592b211bcc4d43f40b94c2c324afd2658db9dfdd --- src/devices/nm-device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 94b94c0151..8fef0d2ee6 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -8558,8 +8558,10 @@ check_and_reapply_connection (NMDevice *self, NM_SETTING_COMPARE_FLAG_IGNORE_SECRETS, &diffs); - if (nm_audit_manager_audit_enabled (nm_audit_manager_get ())) + if (diffs && nm_audit_manager_audit_enabled (nm_audit_manager_get ())) *audit_args = nm_utils_format_con_diff_for_audit (diffs); + else + *audit_args = NULL; /************************************************************************** * check for unsupported changes and reject to reapply