[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTinzMnPiPv7Gv9tC6Tp8c4-dtq9unbpGPcfqE9-=@mail.gmail.com>
Date: Fri, 10 Dec 2010 18:09:25 +0200
From: Daniel Baluta <daniel.baluta@...il.com>
To: Octavian Purdila <opurdila@...acom.com>
Cc: netdev@...r.kernel.org,
Lucian Adrian Grijincu <lucian.grijincu@...il.com>,
Vlad Dogaru <ddvlad@...edu.org>
Subject: Re: [PATCH] iproute2: add dynamic index and name hashes
> + if (!idx_hash) {
> + idx_hash = malloc((1<<hbits) * sizeof(struct idxmap_head));
> + if (!idx_hash)
> + return -1;
> + }
> +
> + if (!name_hash) {
> + name_hash = malloc((1<<hbits) * sizeof(struct idxmap_head));
> + if (!name_hash)
Can you reach this point with idx_hash non-null? Well, then avoid
memory leaks by freeing it.
> + return -1;
> + }
thanks,
Daniel.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists