mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-05 17:16:50 +08:00
fix[camera_source]: Fix memory double-free issue
Fix duplicate memory release issue in camera_source_init Change-Id: If52ef19c7af247e45501e7e3ab8faf4a4c187246 Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
This commit is contained in:
@@ -300,7 +300,6 @@ CamSource *camera_source_init(const char *device, RK_U32 bufcnt, RK_U32 width, R
|
||||
|
||||
if (-1 == camera_source_ioctl(ctx->fd, VIDIOC_QBUF, &buf)) {
|
||||
mpp_err_f("ERROR: VIDIOC_QBUF %d\n", i);
|
||||
camera_source_deinit(ctx);
|
||||
goto FAIL;
|
||||
}
|
||||
}
|
||||
@@ -308,7 +307,6 @@ CamSource *camera_source_init(const char *device, RK_U32 bufcnt, RK_U32 width, R
|
||||
// Start capturing
|
||||
if (-1 == camera_source_ioctl(ctx->fd, VIDIOC_STREAMON, &type)) {
|
||||
mpp_err_f("ERROR: VIDIOC_STREAMON\n");
|
||||
camera_source_deinit(ctx);
|
||||
goto FAIL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user