about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2019-06-20 00:14:05 +0200
committerMichael Vetter <jubalh@iodoru.org>2019-06-20 12:37:32 +0200
commit7ca8ec3e6b130de46e61b95f689d03bc8536702a (patch)
tree94459a20fbc4fb449f7553464542db6e5289075c
parentb8c8059402d923814e6d82d9d32b3c6b3236b0ff (diff)
downloadprofani-tty-7ca8ec3e6b130de46e61b95f689d03bc8536702a.tar.gz
_bookmark_destroy: follow normal logic
-rw-r--r--src/xmpp/bookmark.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/xmpp/bookmark.c b/src/xmpp/bookmark.c
index 99c17c1e..89f1db78 100644
--- a/src/xmpp/bookmark.c
+++ b/src/xmpp/bookmark.c
@@ -318,14 +318,12 @@ _bookmark_result_id_handler(xmpp_stanza_t *const stanza, void *const userdata)
 static void
 _bookmark_destroy(Bookmark *bookmark)
 {
-    if (!bookmark) {
-        return;
+    if (bookmark) {
+        free(bookmark->barejid);
+        free(bookmark->nick);
+        free(bookmark->password);
+        free(bookmark);
     }
-
-    free(bookmark->barejid);
-    free(bookmark->nick);
-    free(bookmark->password);
-    free(bookmark);
 }
 
 static void
/a> 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151