Blob Blame History Raw
commit 11872c12358cb3ec1491c5309280f548d04aa00e
Author: Richard Hughes <richard@hughsie.com>
Date:   Tue Mar 15 11:08:58 2011 +0000

    Fix a crash where the error code was pointing to freed memory. Fixes rh#684464

diff --git a/src/pk-transaction.c b/src/pk-transaction.c
index 5dd4577..34ded99 100644
--- a/src/pk-transaction.c
+++ b/src/pk-transaction.c
@@ -1874,8 +1874,9 @@ pk_transaction_set_running (PkTransaction *transaction)
 	/* set proxy */
 	ret = pk_transaction_set_session_state (transaction, &error);
 	if (!ret) {
-		g_debug ("failed to set the session state (non-fatal): %s", error->message);
-		g_error_free (error);
+		g_debug ("failed to set the session state (non-fatal): %s",
+			 error->message);
+		g_clear_error (&error);
 	}
 
 	/* we are no longer waiting, we are setting up */