Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> pdata and pdata->regs have been allocated in this function and should be freed before leaving it, and in the other error handling cases too. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun Acked-by: Kevin Hilman Signed-off-by: Tony Lindgren — arch/arm/mach-omap2/gpio.c | 2 ++ 1 …
Sep 03 2012
staging: csr: fix possible memory leak in do_patch_convert_download()
Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> pfw has been allocated in function xbv_to_patch() and should be freed before leaving from the error handling cases. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman — drivers/staging/csr/csr_wifi_hip_download.c | 2 ++ 1 file changed, 2 insertions(+) diff –git a/drivers/staging/csr/csr_wifi_hip_download.c b/drivers/staging/csr/csr_wifi_hip_download.c …
Sep 03 2012
parport: fix possible memory leak in parport_gsc_probe_port()
Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> ops has been allocated in this function and should be freed before leaving from the error handling cases. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman — drivers/parport/parport_gsc.c | 1 + 1 file changed, 1 insertion(+) diff –git a/drivers/parport/parport_gsc.c b/drivers/parport/parport_gsc.c …
Sep 03 2012
staging: bcm: fix possible memory leak in bcm_char_ioctl()
Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> psFwInfo has been allocated in this function and should be freed before leaving from the error handling cases. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman — drivers/staging/bcm/Bcmchar.c | 2 ++ 1 file changed, 2 insertions(+) diff –git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c …
Sep 03 2012
mISDN: fix possible memory leak in hfcmulti_init()
Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> hc has been allocated in this function and missing free it before leaving from some error handling cases. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller — drivers/isdn/hardware/mISDN/hfcmulti.c | 2 ++ 1 file changed, 2 insertions(+) diff –git a/drivers/isdn/hardware/mISDN/hfcmulti.c …
Sep 02 2012
parisc: fix possible memory leak in pat_query_module()
Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> pa_pdc_cell has been allocated in this function and so should be freed before leaving from the error handling cases. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun Signed-off-by: Helge Deller — arch/parisc/kernel/inventory.c | 2 ++ 1 file changed, 2 insertions(+) diff –git a/arch/parisc/kernel/inventory.c …
Sep 02 2012
ALSA: fix possible memory leak in snd_mixer_oss_build_input()
Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> uinfo has been allocated in this function and should be freed before leaving from the error handling cases. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun Signed-off-by: Takashi Iwai — sound/core/oss/mixer_oss.c | 2 ++ 1 file changed, 2 insertions(+) diff –git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c …
Sep 02 2012
Btrfs: fix possible memory leak in scrub_setup_recheck_block()
Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> bbio has been malloced in btrfs_map_block() and should be freed before leaving from the error handling cases. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun — fs/btrfs/scrub.c | 1 + 1 file changed, 1 insertion(+) diff –git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index b223620..4e9eafe 100644 — …
Sep 02 2012
nl80211: fix possible memory leak nl80211_connect()
Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> connkeys is malloced in nl80211_parse_connkeys() and should be freed in the error handling case, otherwise it will cause memory leak. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun Signed-off-by: Johannes Berg — net/wireless/nl80211.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) …
Sep 02 2012
NFC: Fix possible LLCP memory leak
Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> nfc_llcp_build_tlv() malloced the memory and should be free in nfc_llcp_build_gb() after used, and the same in the error handling case, otherwise it will cause memory leak. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun Signed-off-by: Samuel Ortiz — net/nfc/llcp/llcp.c | 14 +++++++++—– 1 file …