diff options
author | Dhaval Giani <dhaval@linux.vnet.ibm.com> | 2008-07-04 18:47:59 +0000 |
---|---|---|
committer | Dhaval Giani <dhaval@linux.vnet.ibm.com> | 2008-07-04 18:47:59 +0000 |
commit | 2ebbb7f97eafabcb124f43e8fa59265e5bf3a509 (patch) | |
tree | ad06d4525604dd7ae60e777b2f3450fd291aab41 /tests | |
parent | 53aed66c758cc2309ed5b2a0bb3151ff7278310f (diff) | |
download | libcg-2ebbb7f97eafabcb124f43e8fa59265e5bf3a509.tar.gz libcg-2ebbb7f97eafabcb124f43e8fa59265e5bf3a509.tar.xz libcg-2ebbb7f97eafabcb124f43e8fa59265e5bf3a509.zip |
libcgroup: fix wrong malloc size in testcase
From: Sudhir Kumar <skumar@linux.vnet.ibm.com>
This patch fixes a small mistake in the previous patch for malloc size.
Of course the size should not be of the pointer but the structure.
Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@98 4f4bb910-9a46-0410-90c8-c897d4f1cd53
Diffstat (limited to 'tests')
-rw-r--r-- | tests/libcgrouptest01.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/libcgrouptest01.c b/tests/libcgrouptest01.c index e144e6c..7232994 100644 --- a/tests/libcgrouptest01.c +++ b/tests/libcgrouptest01.c @@ -593,7 +593,7 @@ int check_fsmounted() char entry_buffer[FILENAME_MAX * 4]; FILE *proc_file; - tmp_entry = (struct mntent *) malloc(sizeof(struct mntent *)); + tmp_entry = (struct mntent *) malloc(sizeof(struct mntent)); if (!tmp_entry) { perror("Error: failled to mallloc for mntent\n"); return 1; |