From 394ea23c597736b0721562f0ecb70f6a82dbb84f Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Thu, 16 Jan 2014 16:33:40 +0400 Subject: [PATCH] plugin: Use sizeof(*ptr) in cr_lib_load Signed-off-by: Cyrill Gorcunov Signed-off-by: Pavel Emelyanov --- plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.c b/plugin.c index ca40b25c9..367f9fda3 100644 --- a/plugin.c +++ b/plugin.c @@ -134,7 +134,7 @@ static int cr_lib_load(char *path) ce = NULL; f_fini = dlsym(h, "cr_plugin_fini"); if (f_fini) { - ce = xmalloc(sizeof(struct cr_plugin_entry)); + ce = xmalloc(sizeof(*ce)); if (ce == NULL) goto nomem; ce->cr_fini = f_fini;