Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
spectrwm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ced6f98
)
plug memory leak in get_atom_name
author
David Hill
<dhill@conformal.com>
Fri, 20 Jul 2012 16:39:27 +0000
(12:39 -0400)
committer
Reginald Kennedy
<rk@rejii.com>
Fri, 20 Jul 2012 22:00:03 +0000
(06:00 +0800)
spectrwm.c
patch
|
blob
|
history
diff --git
a/spectrwm.c
b/spectrwm.c
index
d1c876f
..
a4cad40
100644
(file)
--- a/
spectrwm.c
+++ b/
spectrwm.c
@@
-7116,7
+7116,7
@@
maprequest(xcb_map_request_event_t *e)
char *
get_atom_name(xcb_atom_t atom)
{
- char *name;
+ char *name = NULL;
size_t len;
xcb_get_atom_name_reply_t *r;
@@
-7130,14
+7130,12
@@
get_atom_name(xcb_atom_t atom)
if (name) {
memcpy(name, xcb_get_atom_name_name(r), len);
name[len] = '\0';
-
- return name;
}
}
free(r);
}
- return NULL;
+ return (name);
}
#endif