X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=inline;f=openbox%2Fplace.c;h=851e4f8f10301ffac548ef06740e9d04f5df66c3;hb=c6b22725640c2c1ab1023996807e750a11bd72f8;hp=7c20c79f81ef54b2bf47849eb52caaecc2011c34;hpb=9c9095ffac7254da315f53a070f5686dcbc2cf8a;p=chaz%2Fopenbox diff --git a/openbox/place.c b/openbox/place.c index 7c20c79f..851e4f8f 100644 --- a/openbox/place.c +++ b/openbox/place.c @@ -134,6 +134,8 @@ static Rect **pick_head(ObClient *c) for (i = 0; i < screen_num_monitors; ++i) area[i] = screen_area(c->desktop, choice[i], NULL); + g_free(choice); + return area; } @@ -180,7 +182,7 @@ static GSList* area_remove(GSList *list, Rect *a) if (!RECT_INTERSECTS_RECT(*r, *a)) { result = g_slist_prepend(result, r); - r = NULL; /* dont free it */ + /* dont free r, it's moved to the result list */ } else { Rect isect, extra; @@ -215,9 +217,10 @@ static GSList* area_remove(GSList *list, Rect *a) r->width, RECT_BOTTOM(*r) - RECT_BOTTOM(isect)); result = area_add(result, &extra); } - } - g_free(r); + /* 'r' is not being added to the result list, so free it */ + g_free(r); + } } g_slist_free(list); return result;