projects
/
platform
/
core
/
uifw
/
libds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
23f35d7
)
buffer: Add null check after wl_array_add()
16/278116/1
author
Seunghun Lee
<shiin.lee@samsung.com>
Wed, 13 Jul 2022 05:05:47 +0000
(14:05 +0900)
committer
SooChan Lim
<sc1.lim@samsung.com>
Mon, 18 Jul 2022 05:09:05 +0000
(14:09 +0900)
Change-Id: Id5047a9df1418069bd568a44dc702f13fcc509e7
src/buffer.c
patch
|
blob
|
history
diff --git
a/src/buffer.c
b/src/buffer.c
index
60b9925
..
86e7211
100644
(file)
--- a/
src/buffer.c
+++ b/
src/buffer.c
@@
-166,6
+166,11
@@
ds_buffer_register_resource_interface(
}
iface_ptr = wl_array_add(&buffer_resource_interfaces, sizeof(iface));
+ if (!iface_ptr) {
+ ds_err("Could not allocate memory");
+ return;
+ }
+
*iface_ptr = iface;
}