From 2ebbb7f97eafabcb124f43e8fa59265e5bf3a509 Mon Sep 17 00:00:00 2001 From: Dhaval Giani Date: Fri, 4 Jul 2008 18:47:59 +0000 Subject: [PATCH] libcgroup: fix wrong malloc size in testcase From: Sudhir Kumar 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 Signed-off-by: Dhaval Giani git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@98 4f4bb910-9a46-0410-90c8-c897d4f1cd53 --- tests/libcgrouptest01.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/libcgrouptest01.c b/tests/libcgrouptest01.c index e144e6c6..72329944 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; -- 2.47.2