summaryrefslogtreecommitdiff
path: root/src/lib/eet/eet_lib.c
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-05-10 08:54:50 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-05-10 08:54:50 +0900
commit425986b4fedc9496774d848a40059e538b5709f8 (patch)
tree887eea91f78a9ad5689de362142c09fccce290ca /src/lib/eet/eet_lib.c
parent8d71c338bd7b98f5b7c03386c863e639b0c39f60 (diff)
do not make eet files get refcounts of 2 on eet_mmap so they then never free.
we set references to 1 then on success references++... thus ALWAYS being on 2.
Diffstat (limited to 'src/lib/eet/eet_lib.c')
-rw-r--r--src/lib/eet/eet_lib.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/eet/eet_lib.c b/src/lib/eet/eet_lib.c
index 7318db901a..9c9b636512 100644
--- a/src/lib/eet/eet_lib.c
+++ b/src/lib/eet/eet_lib.c
@@ -1436,7 +1436,11 @@ eet_mmap(Eina_File *file)
1436 } 1436 }
1437 1437
1438 ef = eet_cache_find(path, eet_readers, eet_readers_num); 1438 ef = eet_cache_find(path, eet_readers, eet_readers_num);
1439 if (ef && ef->readfp == file) goto done; 1439 if (ef && ef->readfp == file)
1440 {
1441 ef->references++;
1442 goto done;
1443 }
1440 1444
1441 /* Allocate struct for eet file and have it zero'd out */ 1445 /* Allocate struct for eet file and have it zero'd out */
1442 ef = eet_file_malloc(1); 1446 ef = eet_file_malloc(1);
@@ -1470,7 +1474,6 @@ eet_mmap(Eina_File *file)
1470 goto on_error; 1474 goto on_error;
1471 1475
1472 done: 1476 done:
1473 ef->references++;
1474 UNLOCK_CACHE; 1477 UNLOCK_CACHE;
1475 return ef; 1478 return ef;
1476 1479