Replace free and return NULL with return mfree
This commit is contained in:
@@ -78,8 +78,7 @@ Condition* condition_new(ConditionType type, const char *parameter, bool trigger
|
||||
|
||||
r = free_and_strdup(&c->parameter, parameter);
|
||||
if (r < 0) {
|
||||
free(c);
|
||||
return NULL;
|
||||
return mfree(c);
|
||||
}
|
||||
|
||||
return c;
|
||||
|
||||
@@ -648,8 +648,7 @@ DissectedImage* dissected_image_unref(DissectedImage *m) {
|
||||
strv_free(m->machine_info);
|
||||
strv_free(m->os_release);
|
||||
|
||||
free(m);
|
||||
return NULL;
|
||||
return mfree(m);
|
||||
}
|
||||
|
||||
static int is_loop_device(const char *path) {
|
||||
|
||||
@@ -152,9 +152,7 @@ LoopDevice* loop_device_unref(LoopDevice *d) {
|
||||
}
|
||||
|
||||
free(d->node);
|
||||
free(d);
|
||||
|
||||
return NULL;
|
||||
return mfree(d);
|
||||
}
|
||||
|
||||
void loop_device_relinquish(LoopDevice *d) {
|
||||
|
||||
Reference in New Issue
Block a user