diff options
author | waker <wakeroid@gmail.com> | 2011-05-04 21:52:42 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2011-05-04 21:52:42 +0200 |
commit | 8bd63ad1edfc198a0341fa25402156d4c95a9317 (patch) | |
tree | 8dd6a3f9f643eaa3a1861bae000a61afc7df8743 | |
parent | 73c810927a3639f9b0f3a0d8bc203fc23ee4239f (diff) |
don't leak if messagepump overflows
-rw-r--r-- | messagepump.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/messagepump.c b/messagepump.c index 77c563f7..7299cabf 100644 --- a/messagepump.c +++ b/messagepump.c @@ -75,6 +75,9 @@ int messagepump_push (uint32_t id, uintptr_t ctx, uint32_t p1, uint32_t p2) { if (!mfree) { fprintf (stderr, "WARNING: message queue is full! message ignored (%d %p %d %d)\n", id, (void*)ctx, p1, p2); + if (id >= DB_EV_FIRST && ctx) { + messagepump_event_free ((ddb_event_t *)ctx); + } return -1; } mutex_lock (mutex); |