|
@@ -114,7 +114,7 @@ int iwpm_create_mapinfo(struct sockaddr_storage *local_sockaddr,
|
|
|
struct sockaddr_storage *mapped_sockaddr,
|
|
|
u8 nl_client)
|
|
|
{
|
|
|
- struct hlist_head *hash_bucket_head;
|
|
|
+ struct hlist_head *hash_bucket_head = NULL;
|
|
|
struct iwpm_mapping_info *map_info;
|
|
|
unsigned long flags;
|
|
|
int ret = -EINVAL;
|
|
@@ -142,6 +142,9 @@ int iwpm_create_mapinfo(struct sockaddr_storage *local_sockaddr,
|
|
|
}
|
|
|
}
|
|
|
spin_unlock_irqrestore(&iwpm_mapinfo_lock, flags);
|
|
|
+
|
|
|
+ if (!hash_bucket_head)
|
|
|
+ kfree(map_info);
|
|
|
return ret;
|
|
|
}
|
|
|
|