Skip to content

Commit c411a3f

Browse files
c_sridurkhusika
authored andcommitted
mm-video: venc: Fix reconbuffer free crash.
- ION_IOC_FREE for reconbuffer is called with invalid fd -1. Modified code to check proper fd value before freeing. Change-Id: I669d545bbdd9fe894a66c0e6f0279692c1460980
1 parent 88aaf20 commit c411a3f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mm-video/vidc/venc/src/video_encoder_device.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*--------------------------------------------------------------------------
2-
Copyright (c) 2010-2013, The Linux Foundation. All rights reserved.
2+
Copyright (c) 2010-2013,2015 The Linux Foundation. All rights reserved.
33
44
Redistribution and use in source and binary forms, with or without
55
modification, are permitted provided that the following conditions are met:
@@ -1558,7 +1558,7 @@ OMX_U32 venc_dev::pmem_free()
15581558
struct venc_recon_addr recon_addr;
15591559
for (cnt = 0; cnt < recon_buffers_count; cnt++)
15601560
{
1561-
if(recon_buff[cnt].pmem_fd)
1561+
if(recon_buff[cnt].pmem_fd > 0)
15621562
{
15631563
recon_addr.pbuffer = recon_buff[cnt].virtual_address;
15641564
recon_addr.offset = recon_buff[cnt].offset;

0 commit comments

Comments
 (0)