Need to zero out the malloced constructor results in case not all

fields are initialized.
This commit is contained in:
Alex Shinn 2011-08-09 00:31:09 +09:00
parent 3b44424140
commit ff884b7314

View file

@ -1093,6 +1093,8 @@
"));\n"
" r = sexp_cpointer_value(res) = malloc(sizeof("
(or (type-struct-type name) "") " " (type-name name) "));\n"
" memset(r, 0, sizeof("
(or (type-struct-type name) "") " " (type-name name) "));\n"
" sexp_freep(res) = 1;\n"
(lambda ()
(let lp ((ls args) (i 0))