Commit 88203016 authored by Andreas Schmidt's avatar Andreas Schmidt

Proper destroying of dataPacketStore.

parent 35b5c6f9
Pipeline #103 failed with stage
......@@ -13,6 +13,8 @@ PrrtDataPacketStore *PrrtDataPacketStore_create(void)
check_mem(store);
check(pthread_mutex_init(&store->lock, NULL) == EXIT_SUCCESS, "Init mutex failed.")
store->dataStore = NULL;
return store;
error:
PERROR("Out of memory%s.","");
......@@ -43,7 +45,9 @@ bool PrrtDataPacketStore_destroy(PrrtDataPacketStore *store)
check(pthread_mutex_destroy(&store->lock) == EXIT_SUCCESS, "Destroy failed.");
store->dataStore = BPTree_destroy(store->dataStore);
if(store->dataStore != NULL) {
store->dataStore = BPTree_destroy(store->dataStore);
}
free(store);
return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment