[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r9838 - Extractor/src/main
From: |
gnunet |
Subject: |
[GNUnet-SVN] r9838 - Extractor/src/main |
Date: |
Mon, 21 Dec 2009 12:37:43 +0100 |
Author: grothoff
Date: 2009-12-21 12:37:43 +0100 (Mon, 21 Dec 2009)
New Revision: 9838
Modified:
Extractor/src/main/extractor.c
Log:
fixing CID 206
Modified: Extractor/src/main/extractor.c
===================================================================
--- Extractor/src/main/extractor.c 2009-12-21 11:35:25 UTC (rev 9837)
+++ Extractor/src/main/extractor.c 2009-12-21 11:37:43 UTC (rev 9838)
@@ -1117,6 +1117,7 @@
{
if (strlen (fn) == 0)
break;
+ ptr = NULL;
fn[strlen(fn)-1] = '\0'; /* kill newline */
if ( (-1 != (shmid = shm_open (fn, O_RDONLY, 0))) &&
(((off_t)-1) != (size = lseek (shmid, 0, SEEK_END))) &&
@@ -1132,7 +1133,8 @@
if (0 != write_all (out, &hdr, sizeof(hdr)))
break;
}
- if (ptr != NULL)
+ if ( (ptr != NULL) &&
+ (ptr != (void*) -1) )
munmap (ptr, size);
if (-1 != shmid)
close (shmid);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r9838 - Extractor/src/main,
gnunet <=