aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/bsd_comp.c28
1 files changed, 11 insertions, 17 deletions
diff --git a/drivers/net/bsd_comp.c b/drivers/net/bsd_comp.c
index 3d88ad622bdb..fb4098ed469e 100644
--- a/drivers/net/bsd_comp.c
+++ b/drivers/net/bsd_comp.c
@@ -323,33 +323,27 @@ static void bsd_reset (void *state)
323 */ 323 */
324 324
325static void bsd_free (void *state) 325static void bsd_free (void *state)
326 { 326{
327 struct bsd_db *db = (struct bsd_db *) state; 327 struct bsd_db *db = state;
328 328
329 if (db) 329 if (!db)
330 { 330 return;
331
331/* 332/*
332 * Release the dictionary 333 * Release the dictionary
333 */ 334 */
334 if (db->dict) 335 vfree(db->dict);
335 { 336 db->dict = NULL;
336 vfree (db->dict);
337 db->dict = NULL;
338 }
339/* 337/*
340 * Release the string buffer 338 * Release the string buffer
341 */ 339 */
342 if (db->lens) 340 vfree(db->lens);
343 { 341 db->lens = NULL;
344 vfree (db->lens);
345 db->lens = NULL;
346 }
347/* 342/*
348 * Finally release the structure itself. 343 * Finally release the structure itself.
349 */ 344 */
350 kfree (db); 345 kfree(db);
351 } 346}
352 }
353 347
354/* 348/*
355 * Allocate space for a (de) compressor. 349 * Allocate space for a (de) compressor.