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