summaryrefslogtreecommitdiff
path: root/src/wayland-server.c
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2013-03-07 23:32:39 +0100
committerKristian Høgsberg <krh@bitplanet.net>2013-03-17 16:24:02 -0400
commite053a5625129bd11c301c9587f5f29cbda95c66d (patch)
tree1923029adc5bc5c74f654850f3bbbc1bf18f810a /src/wayland-server.c
parent9a2fab49e5e5867d58ba67eb028c003db35de1bb (diff)
client: Check reference count only for destroyed proxies
The llvm static analyzer tool reported "Use of memory after it is freed" in dispatch_event() because the proxy is used after being freed if the reference count reaches zero without the destroyed flag being set. This would never happen in practice because the owner of the proxy object always holds a reference until calling wl_proxy_destroy() which would also set the destroyed flag. Since this is the case, it is safe to do the reference count check only if the destroyed flag is set, as it can never reach zero if not. This commit doesn't change the behavior of the function, but makes the static analyzer more happy. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=61385 Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Diffstat (limited to 'src/wayland-server.c')
0 files changed, 0 insertions, 0 deletions