From 5b497250092031e769554665b26db3da585eabad Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Thu, 30 Oct 2008 15:52:47 +0100 Subject: [PATCH] Fixed allocation of out-direction sequence parameters --- forb-idl/forb-idl-c-stubs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/forb-idl/forb-idl-c-stubs.c b/forb-idl/forb-idl-c-stubs.c index 9466c4b..dc5c823 100644 --- a/forb-idl/forb-idl-c-stubs.c +++ b/forb-idl/forb-idl-c-stubs.c @@ -111,6 +111,7 @@ cs_output_stub (IDL_tree tree, role == DATA_OUT) { /* Allocate out sequence */ fprintf(ci->fh, " *%s = forb_malloc(sizeof(**%s));\n", name, name); fprintf(ci->fh, " if (!*%s) { ev->major = FORB_EX_NO_MEMORY; goto exception; }\n", name); + fprintf(ci->fh, " memset(*%s, 0, sizeof(**%s));\n", name); /* TODO: Free previously allocated parameters on no memory error. */ } fprintf(of, " "); -- 2.39.2