Fix use after free
authorRicardo Mones <ricardo@mones.org>
Tue, 18 Apr 2017 10:13:33 +0000 (12:13 +0200)
committerRicardo Mones <ricardo@mones.org>
Tue, 18 Apr 2017 10:13:33 +0000 (12:13 +0200)
src/imap.c

index eb810a3..0e1e777 100644 (file)
@@ -1320,8 +1320,9 @@ try_again:
                }
 
                if (acc_pass != NULL) {
-                       g_free(acc_pass);
                        memset(acc_pass, 0, strlen(acc_pass));
+                       g_free(acc_pass);
+                       acc_pass = NULL;
                }
 
                return ok;