about summary refs log tree commit diff stats
path: root/src/resource.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-08-25 23:27:42 +0100
committerJames Booth <boothj5@gmail.com>2013-08-25 23:27:42 +0100
commitd3cfeb9d5cac0520d43dbf35e36d9364c35a95e5 (patch)
treee262e193eadbb95717e6b04612ace879c7be5848 /src/resource.c
parent3c39befa5e565bbc3cc13a0f060a8d7a18f735f1 (diff)
parente21bf8a18d682ae95699b6ddedf17aa870303a3c (diff)
downloadprofani-tty-d3cfeb9d5cac0520d43dbf35e36d9364c35a95e5.tar.gz
Merge branch 'master' into windows
Diffstat (limited to 'src/resource.c')
-rw-r--r--src/resource.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/resource.c b/src/resource.c
index 0a7838f3..86ba7e18 100644
--- a/src/resource.c
+++ b/src/resource.c
@@ -81,9 +81,10 @@ resource_compare_availability(Resource *first, Resource *second)
 
 void resource_destroy(Resource *resource)
 {
-    assert(resource != NULL);
-    FREE_SET_NULL(resource->name);
-    FREE_SET_NULL(resource->status);
-    FREE_SET_NULL(resource->caps_str);
-    FREE_SET_NULL(resource);
+    if (resource != NULL) {
+        free(resource->name);
+        free(resource->status);
+        free(resource->caps_str);
+        free(resource);
+    }
 }