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 @@ -323,6 +323,7 @@ static const struct rhashtable_params ipmr_rht_params = {
323
323
static struct mr_table * ipmr_new_table (struct net * net , u32 id )
324
324
{
325
325
struct mr_table * mrt ;
326
+ int err ;
326
327
327
328
/* "pimreg%u" should not exceed 16 bytes (IFNAMSIZ) */
328
329
if (id != RT_TABLE_DEFAULT && id >= 1000000000 )
@@ -338,7 +339,11 @@ static struct mr_table *ipmr_new_table(struct net *net, u32 id)
338
339
write_pnet (& mrt -> net , net );
339
340
mrt -> id = id ;
340
341
341
- rhltable_init (& mrt -> mfc_hash , & ipmr_rht_params );
342
+ err = rhltable_init (& mrt -> mfc_hash , & ipmr_rht_params );
343
+ if (err ) {
344
+ kfree (mrt );
345
+ return ERR_PTR (err );
346
+ }
342
347
INIT_LIST_HEAD (& mrt -> mfc_cache_list );
343
348
INIT_LIST_HEAD (& mrt -> mfc_unres_queue );
344
349
You can’t perform that action at this time.
0 commit comments