From 00b475856400f6dee3bdf09679fe2a4f841d6f23 Mon Sep 17 00:00:00 2001 From: MelwareDE Date: Tue, 14 Jun 2011 11:34:59 +0000 Subject: [PATCH] Fixed descriptor leak --- divastreaming/segment_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/divastreaming/segment_alloc.c b/divastreaming/segment_alloc.c index 0f05846..fee8796 100644 --- a/divastreaming/segment_alloc.c +++ b/divastreaming/segment_alloc.c @@ -212,7 +212,7 @@ int diva_destroy_segment_alloc (struct _diva_segment_alloc** segment_alloc) { #if defined(LINUX) if (pI->fd >= 0) close (pI->fd); - if (pI->fd_mem == 0) + if (pI->fd_mem >= 0) close (pI->fd_mem); #endif #else