$OpenBSD: patch-i3bar_src_config_c,v 1.1 2014/07/11 15:49:58 dcoppa Exp $

commit 0095ca8770c0f256cc46216f24e3c823d31b434d
Author: Tony Crisci <tony@dubstepdish.com>
Date:   Tue Jul 1 23:17:02 2014 -0400

Use FREE macro for freeing colors

This macro will set the colors to NULL which avoids a double free on
reload when colors that were unconfigured become configured.

--- i3bar/src/config.c.orig	Sun Jun 15 19:12:43 2014
+++ i3bar/src/config.c	Fri Jul 11 16:48:56 2014
@@ -248,8 +248,7 @@ void parse_config_json(char *json) {
 void free_colors(struct xcb_color_strings_t *colors) {
 #define FREE_COLOR(x)        \
     do {                     \
-        if (colors->x)       \
-            free(colors->x); \
+        FREE(colors->x);     \
     } while (0)
     FREE_COLOR(bar_fg);
     FREE_COLOR(bar_bg);
