Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96a7ebea authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "dsp: bugfix for memory leak in error handling path"

parents 117a5dd6 ff8d8d42
Loading
Loading
Loading
Loading

dsp/audio_calibration.c

100755 → 100644
+6 −3
Original line number Diff line number Diff line
@@ -148,7 +148,7 @@ int audio_cal_register(int num_cal_types,
			GFP_KERNEL);
		if (callback_node == NULL) {
			ret = -ENOMEM;
			goto err;
			goto err_callback_node;
		}

		memcpy(callback_node, &reg_data[i].callbacks,
@@ -160,10 +160,13 @@ int audio_cal_register(int num_cal_types,
			&audio_cal.client_info[reg_data[i].cal_type]);
		mutex_unlock(&audio_cal.cal_mutex[reg_data[i].cal_type]);
	}
done:
	return ret;
	goto done;

err_callback_node:
	kfree(client_info_node);
err:
	audio_cal_deregister(num_cal_types, reg_data);
done:
	return ret;
}