[gmime] Reset streams back to NULL



commit cb7a383c7308c8e3fa2fdbbc56b13f271f751c09
Author: Jeffrey Stedfast <jestedfa microsoft com>
Date:   Fri Mar 10 15:25:44 2017 -0500

    Reset streams back to NULL

 tests/test-pgpmime.c |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/tests/test-pgpmime.c b/tests/test-pgpmime.c
index 4adc982..3911492 100644
--- a/tests/test-pgpmime.c
+++ b/tests/test-pgpmime.c
@@ -505,11 +505,15 @@ int main (int argc, char *argv[])
                testsuite_check_failed ("multipart/encrypted failed: %s", ex->message);
        } finally;
        
-       if (cleartext)
+       if (cleartext) {
                g_object_unref (cleartext);
+               cleartext = NULL;
+       }
        
-       if (stream)
+       if (stream) {
                g_object_unref (stream);
+               stream = NULL;
+       }
        
        g_free (session_key);
        
@@ -526,11 +530,15 @@ int main (int argc, char *argv[])
                testsuite_check_failed ("multipart/encrypted+sign failed: %s", ex->message);
        } finally;
        
-       if (cleartext)
+       if (cleartext) {
                g_object_unref (cleartext);
+               cleartext = NULL;
+       }
        
-       if (stream)
+       if (stream) {
                g_object_unref (stream);
+               stream = NULL;
+       }
        
        g_free (session_key);
        


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]