Commit 3dd5d577 authored by Duncan Sands's avatar Duncan Sands Committed by Greg Kroah-Hartman

[PATCH] USB speedtouch: Fix atmsar memory leak

Leak found by the Stanford Checker (patch by Randy Dunlap).
parent a788b63e
......@@ -285,14 +285,14 @@ struct atmsar_vcc_data *atmsar_open (struct atmsar_vcc_data **list, struct atm_v
{
struct atmsar_vcc_data *new;
if (!vcc)
return NULL;
new = kmalloc (sizeof (struct atmsar_vcc_data), GFP_KERNEL);
if (!new)
return NULL;
if (!vcc)
return NULL;
memset (new, 0, sizeof (struct atmsar_vcc_data));
new->vcc = vcc;
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment