diff options
| author | David Xu <davidxu@FreeBSD.org> | 2004-08-16 05:20:12 +0000 |
|---|---|---|
| committer | David Xu <davidxu@FreeBSD.org> | 2004-08-16 05:20:12 +0000 |
| commit | 2eb43a641f49592a9c12fe5a730ebd3470d833c1 (patch) | |
| tree | 33281c8c932d99bd459bea860c26c3d11e91900a /lib/libthread_db | |
| parent | 47208ac20a9fd5bdd4f9e2a9afe0738499b75c96 (diff) | |
Notes
Diffstat (limited to 'lib/libthread_db')
| -rw-r--r-- | lib/libthread_db/libpthread_db.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libthread_db/libpthread_db.c b/lib/libthread_db/libpthread_db.c index c40b66a7fde6..603f30ed1696 100644 --- a/lib/libthread_db/libpthread_db.c +++ b/lib/libthread_db/libpthread_db.c @@ -400,8 +400,10 @@ pt_ta_tsd_iter(const td_thragent_t *ta, td_key_iter_f *ki, void *arg) return (TD_MALLOC); ret = ps_pread(ta->ph, (psaddr_t)ta->thread_keytable_addr, keytable, ta->thread_max_keys * ta->thread_size_key); - if (ret != 0) + if (ret != 0) { + free(keytable); return (P2T(ret)); + } for (i = 0; i < ta->thread_max_keys; i++) { allocated = *(int *)(keytable + i * ta->thread_size_key + ta->thread_off_key_allocated); |
