Merge pull request #223 from maep--/master
fix crash caused by free of uninitialized pointer
This commit is contained in:
commit
82242f58e8
|
@ -351,7 +351,7 @@ isdamagenotify(session_t *ps, const XEvent *ev) {
|
||||||
*/
|
*/
|
||||||
static inline XTextProperty *
|
static inline XTextProperty *
|
||||||
make_text_prop(session_t *ps, char *str) {
|
make_text_prop(session_t *ps, char *str) {
|
||||||
XTextProperty *pprop = cmalloc(1, XTextProperty);
|
XTextProperty *pprop = ccalloc(1, XTextProperty);
|
||||||
|
|
||||||
if (XmbTextListToTextProperty(ps->dpy, &str, 1, XStringStyle, pprop)) {
|
if (XmbTextListToTextProperty(ps->dpy, &str, 1, XStringStyle, pprop)) {
|
||||||
cxfree(pprop->value);
|
cxfree(pprop->value);
|
||||||
|
|
Loading…
Reference in New Issue