system-controller: fix a premature free().
authorIsmo Puustinen <ismo.puustinen@intel.com>
Mon, 24 Feb 2014 13:38:54 +0000 (15:38 +0200)
committerKrisztian Litkey <krisztian.litkey@intel.com>
Thu, 8 Jan 2015 16:37:14 +0000 (18:37 +0200)
Change-Id: I44778f9df127e23cf2d0ac95207e1e14c28f99b5

src/plugins/system-controller/resource-manager/audio.c

index 621eb38..93c0f0d 100644 (file)
@@ -589,9 +589,9 @@ static void audio_resource_destroy(mrp_resmgr_audio_t *audio,
         mrp_htbl_remove(audio->resources, NULL + ar->audioid, false);
 
         mrp_list_delete(&ar->link);
-        mrp_free(ar);
 
         mrp_resmgr_notifier_flush_audio_events(audio->resmgr, ar->zoneid);
+        mrp_free(ar);
     }
 }