diff options
author | David Robillard <d@drobilla.net> | 2015-09-11 19:42:02 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2015-09-11 19:42:02 +0000 |
commit | 36b470397a178ca64bc6d98ecc652aaa7671c938 (patch) | |
tree | e9749b710d23c1c1abf28c158e2c80d7036efef2 /src/x11_in_qt4.cpp | |
parent | 0dc88a80b345e0c2fe13bf54a0d57b348f6205d2 (diff) | |
download | suil-36b470397a178ca64bc6d98ecc652aaa7671c938.tar.gz suil-36b470397a178ca64bc6d98ecc652aaa7671c938.tar.bz2 suil-36b470397a178ca64bc6d98ecc652aaa7671c938.zip |
Zero-initialize wrapper structs.
git-svn-id: http://svn.drobilla.net/lad/trunk/suil@5723 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/x11_in_qt4.cpp')
-rw-r--r-- | src/x11_in_qt4.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/x11_in_qt4.cpp b/src/x11_in_qt4.cpp index 8880dbe..fa58fc5 100644 --- a/src/x11_in_qt4.cpp +++ b/src/x11_in_qt4.cpp @@ -124,11 +124,9 @@ suil_wrapper_new(SuilHost* host, unsigned n_features) { SuilX11InQt4Wrapper* const impl = (SuilX11InQt4Wrapper*) - malloc(sizeof(SuilX11InQt4Wrapper)); - impl->host_widget = NULL; - impl->parent = NULL; + calloc(1, sizeof(SuilX11InQt4Wrapper)); - SuilWrapper* wrapper = (SuilWrapper*)malloc(sizeof(SuilWrapper)); + SuilWrapper* wrapper = (SuilWrapper*)calloc(1, sizeof(SuilWrapper)); wrapper->wrap = wrapper_wrap; wrapper->free = wrapper_free; |