projects
/
platform
/
upstream
/
pulseaudio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a9c3503
)
object: Initialize allocated memory to zero
author
Tanu Kaskinen
<tanu.kaskinen@linux.intel.com>
Wed, 19 Jun 2013 15:40:17 +0000
(18:40 +0300)
committer
Tanu Kaskinen
<tanu.kaskinen@linux.intel.com>
Tue, 25 Jun 2013 16:15:48 +0000
(19:15 +0300)
This is safer and more convenient for subclasses.
src/pulsecore/object.c
patch
|
blob
|
history
diff --git
a/src/pulsecore/object.c
b/src/pulsecore/object.c
index
0dc8198
..
b6fbe90
100644
(file)
--- a/
src/pulsecore/object.c
+++ b/
src/pulsecore/object.c
@@
-40,7
+40,7
@@
pa_object *pa_object_new_internal(size_t size, const char *type_id, pa_bool_t (*
pa_assert(check_type(type_id));
pa_assert(check_type(pa_object_type_id));
- o = pa_xmalloc(size);
+ o = pa_xmalloc
0
(size);
PA_REFCNT_INIT(o);
o->type_id = type_id;
o->free = pa_object_free;