diff options
author | James Booth <boothj5@gmail.com> | 2014-06-24 22:23:53 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2014-06-24 22:23:53 +0100 |
commit | 83fc97621c2828d1fcbe20e95d258fdaab71c9eb (patch) | |
tree | 7ec969c7598056387e74b05f7f8d9beff467b784 | |
parent | c3847eec34476fa15d8bc50671f1377a0cb27fd8 (diff) | |
download | profani-tty-83fc97621c2828d1fcbe20e95d258fdaab71c9eb.tar.gz |
Check for null before freeing X11info, removed free current resource
-rw-r--r-- | src/contact.c | 1 | ||||
-rw-r--r-- | src/ui/core.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/contact.c b/src/contact.c index 839e7d10..c57d1902 100644 --- a/src/contact.c +++ b/src/contact.c @@ -241,7 +241,6 @@ _get_most_available_resource(PContact contact) resources = g_list_next(resources); } free(resources); - free(current); return highest; } diff --git a/src/ui/core.c b/src/ui/core.c index 30f79659..254af048 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -137,7 +137,9 @@ _ui_get_idle_time(void) XFree(info); return result; } - XFree(info); + if (info != NULL) { + XFree(info); + } // if no libxss or xss idle time failed, use profanity idle time #endif gdouble seconds_elapsed = g_timer_elapsed(ui_idle_time, NULL); |