device: fix crash in nm_device_generate_connection()

Fixes: 89d1c9fb30

https://bugzilla.redhat.com/show_bug.cgi?id=1631741
(cherry picked from commit f744e29dd3)
This commit is contained in:
Beniamino Galvani 2018-09-27 18:07:34 +02:00 committed by Thomas Haller
parent ea4f8a0cad
commit 3fc592219e

View file

@ -5486,7 +5486,7 @@ nm_device_generate_connection (NMDevice *self,
klass->update_connection (self, connection);
if (!nm_connection_normalize (connection, NULL, NULL, error)) {
if (!nm_connection_normalize (connection, NULL, NULL, &local)) {
g_set_error (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_FAILED,
"generated connection does not verify: %s",
local->message);