diff options
author | Dhaval Giani <dhaval@linux.vnet.ibm.com> | 2009-01-05 16:20:44 +0000 |
---|---|---|
committer | Dhaval Giani <dhaval@linux.vnet.ibm.com> | 2009-01-05 16:20:44 +0000 |
commit | ef6ff7a1f1695644fec73d889a17a6c16a6fb7e2 (patch) | |
tree | 7065449aa91f94ba661879171055019ee9fda996 /samples | |
parent | 71f83660f99a20e2b6fcb4c4aa9747c207e2934a (diff) | |
download | libcg-ef6ff7a1f1695644fec73d889a17a6c16a6fb7e2.tar.gz libcg-ef6ff7a1f1695644fec73d889a17a6c16a6fb7e2.tar.xz libcg-ef6ff7a1f1695644fec73d889a17a6c16a6fb7e2.zip |
libcgroup: Intialize all pointers in api.c
Recently, while debugging an issue with test cases, I realized the
pitfalls of not initializing your pointers. On looking into api.c,
I realized that a lot of pointers are not initialized. Hence, this
patch.
Tested against the libcgrouptest suite. No regressions could be
were observed.
Balbir says,
> We should avoid double initialization specially if a
>
> *ptr = NULL is followed by
> ptr = malloc(...)
>
> I don't see any concerns right now, but something to be aware of
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@298 4f4bb910-9a46-0410-90c8-c897d4f1cd53
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions