File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -356,6 +356,7 @@ static const struct rhashtable_params ipmr_rht_params = {
356
356
static struct mr_table * ipmr_new_table (struct net * net , u32 id )
357
357
{
358
358
struct mr_table * mrt ;
359
+ int err ;
359
360
360
361
/* "pimreg%u" should not exceed 16 bytes (IFNAMSIZ) */
361
362
if (id != RT_TABLE_DEFAULT && id >= 1000000000 )
@@ -371,7 +372,11 @@ static struct mr_table *ipmr_new_table(struct net *net, u32 id)
371
372
write_pnet (& mrt -> net , net );
372
373
mrt -> id = id ;
373
374
374
- rhltable_init (& mrt -> mfc_hash , & ipmr_rht_params );
375
+ err = rhltable_init (& mrt -> mfc_hash , & ipmr_rht_params );
376
+ if (err ) {
377
+ kfree (mrt );
378
+ return ERR_PTR (err );
379
+ }
375
380
INIT_LIST_HEAD (& mrt -> mfc_cache_list );
376
381
INIT_LIST_HEAD (& mrt -> mfc_unres_queue );
377
382
You can’t perform that action at this time.
0 commit comments