1
0
forked from vitrine/wmaker
Files
wmaker/src
Tamas TEVESZ dce16306bc Plug some (possible) memleaks
PropGetWMClass()

- XAllocClassHint()s a struct for class hint data
- This is filled by XGetClassHint(), which in turn uses Xlib to allocate
  some more space for XClassHint members
- Upon XGetClassHint() failure, "default" is libc malloc'd (via strdup),
  and is returned to the caller
- Upon XGetClassHint() success, XClassHint members are returned raw --
  these members must be freed with XFree() (see XAllocClassHint(3))
- Thus it's up to PropGetWMClass() callers to decide (based upon the return
  value) which method (libc free() or XFree()) to use to free res_name
  and res_class. This was done nowhere, thus leaking some memory
  on every failed PropGetWMClass() call.
- So just strdup the successful res_name/res_class members, XFree() them
  while still in PropGetWMClass(), and allow callers to unconditionally
  libc free() whatever PropGetWMClass() returns.
2011-04-18 13:25:44 -07:00
..
2010-10-08 22:03:31 +02:00
2010-10-08 22:03:31 +02:00
2011-03-24 16:19:52 +01:00
2010-10-08 22:03:31 +02:00
2010-09-11 17:32:57 +02:00
2011-03-30 23:32:37 +02:00
2011-03-24 16:19:52 +01:00
2011-04-18 13:25:44 -07:00
2011-03-24 16:19:52 +01:00
2010-09-11 17:32:57 +02:00
2010-11-17 02:53:04 +01:00
2011-03-24 16:19:52 +01:00
2010-10-08 22:00:24 +02:00
2011-03-24 16:19:52 +01:00
2010-10-07 12:04:29 +02:00
2011-03-24 16:19:52 +01:00
2011-03-24 16:19:52 +01:00
2011-03-24 16:19:52 +01:00
2010-03-27 10:31:13 +01:00
2010-11-29 11:59:22 +01:00
2011-04-18 13:25:44 -07:00
2011-03-24 16:19:52 +01:00
2011-04-18 13:25:44 -07:00
2010-10-08 22:00:23 +02:00
2010-03-20 18:42:56 +01:00
2004-10-12 21:28:27 +00:00
2010-09-17 10:18:35 +02:00
2011-04-18 13:23:22 -07:00
2011-04-18 13:25:44 -07:00
2011-04-18 13:23:22 -07:00
2011-03-30 23:32:37 +02:00
2010-11-17 02:53:04 +01:00
2011-04-18 13:23:22 -07:00
2011-04-18 13:23:22 -07:00
2011-03-24 16:19:52 +01:00
2009-08-27 16:34:44 +02:00
1999-05-18 20:40:30 +00:00
2011-03-24 16:19:52 +01:00
1998-09-29 22:36:29 +00:00