Re: [PATCH] xfsprogs: fix potential memory free issues in quota_group_type()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/22/13 01:45, Li Zhong wrote:
This patch tries to fix CID 997009 reported by Coverity scan, as
suggested by sekharan

If getgroups() fails, gids might be malloced, and overwritten with &gid.
So the free() at the end of the function is trying to free a variable on
the stack, while the pointer to the allocated memory is lost.

Signed-off-by: Li Zhong<zhong@xxxxxxxxxxxxxxxxxx>
---

Looks good to me.

And it seems that dofree would always be true in the following else statement.

Reviewed-by: Mark Tinguely <tinguely@xxxxxxx>

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs




[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux