If we cannot create the data_offer resource, then cleanup and exit
authorChris Michael <cp.michael@samsung.com>
Tue, 5 Nov 2013 08:05:07 +0000 (08:05 +0000)
committerChris Michael <cp.michael@samsung.com>
Wed, 6 Nov 2013 07:07:50 +0000 (07:07 +0000)
nicely.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/bin/e_comp_wl.c

index 9f04932..82a52c5 100644 (file)
@@ -793,6 +793,12 @@ wl_data_source_send_offer(struct wl_data_source *source, struct wl_resource *tar
    offer->resource = 
      wl_resource_create(wl_resource_get_client(target),
                         &wl_data_offer_interface, 1, 0);
+   if (!offer->resource)
+     {
+        free(offer);
+        return NULL;
+     }
+
    wl_resource_set_implementation(offer->resource, &_e_data_offer_interface, 
                                   offer, _destroy_data_offer);