summaryrefslogtreecommitdiffstats
path: root/src/gtk2_in_qt4.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gtk2_in_qt4.cpp')
-rw-r--r--src/gtk2_in_qt4.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gtk2_in_qt4.cpp b/src/gtk2_in_qt4.cpp
index 731a4d8..641d1ba 100644
--- a/src/gtk2_in_qt4.cpp
+++ b/src/gtk2_in_qt4.cpp
@@ -127,10 +127,7 @@ suil_wrapper_new(SuilHost* host,
/* Create wrapper implementation. */
SuilGtk2InQt4Wrapper* const impl = (SuilGtk2InQt4Wrapper*)
- malloc(sizeof(SuilGtk2InQt4Wrapper));
- impl->host_widget = NULL;
- impl->parent = NULL;
- impl->plug = NULL;
+ calloc(1, sizeof(SuilGtk2InQt4Wrapper));
/* Set parent widget if given. */
for (unsigned i = 0; i < n_features; ++i) {
@@ -139,7 +136,7 @@ suil_wrapper_new(SuilHost* host,
}
}
- SuilWrapper* wrapper = (SuilWrapper*)malloc(sizeof(SuilWrapper));
+ SuilWrapper* wrapper = (SuilWrapper*)calloc(1, sizeof(SuilWrapper));
wrapper->wrap = wrapper_wrap;
wrapper->free = wrapper_free;
wrapper->impl = impl;