summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2012-08-21 02:22:20 +0000
committerCedric BAIL <cedric.bail@free.fr>2012-08-21 02:22:20 +0000
commit153afa9283b5823cc69799f876eb7068f077ff5a (patch)
tree0fce765488e9473b321129408ced4d194e56698f
parent335912df94bf532b801883864faee2edd59ce6fb (diff)
eio: revert r75445 and add a comment to prevent it to happen again.
Yes, it's the second time someone "fix" that and get reverted. Actually looking at svn log would have shown the issue as it was just the previous commit. SVN revision: 75482
-rw-r--r--legacy/eio/ChangeLog5
-rw-r--r--legacy/eio/src/lib/eio_single.c27
2 files changed, 12 insertions, 20 deletions
diff --git a/legacy/eio/ChangeLog b/legacy/eio/ChangeLog
index 3f0552f733..d78efeaa43 100644
--- a/legacy/eio/ChangeLog
+++ b/legacy/eio/ChangeLog
@@ -17,3 +17,8 @@
172012-08-07 Cedric Bail 172012-08-07 Cedric Bail
18 18
19 * Properly shutdown monitor when calling eio_shutdown. 19 * Properly shutdown monitor when calling eio_shutdown.
20
212012-08-21 Cedric Bail
22
23 * Add a comment describing the false positiv detected by static analyzer
24 when calling eio_file_set.
diff --git a/legacy/eio/src/lib/eio_single.c b/legacy/eio/src/lib/eio_single.c
index afdc9135c2..69f4185c29 100644
--- a/legacy/eio/src/lib/eio_single.c
+++ b/legacy/eio/src/lib/eio_single.c
@@ -421,10 +421,9 @@ eio_file_direct_stat(const char *path,
421 _eio_file_stat, 421 _eio_file_stat,
422 _eio_file_stat_done, 422 _eio_file_stat_done,
423 _eio_file_stat_error)) 423 _eio_file_stat_error))
424 { 424 /* THERE IS NO MEMLEAK HERE, ECORE_THREAD CANCEL CALLBACK HAS BEEN ALREADY CALLED
425 free(s); 425 AND s HAS BEEN FREED, SAME FOR ALL CALL TO EIO_FILE_SET ! */
426 return NULL; 426 return NULL;
427 }
428 427
429 return &s->common; 428 return &s->common;
430} 429}
@@ -485,10 +484,7 @@ eio_file_unlink(const char *path,
485 _eio_file_unlink, 484 _eio_file_unlink,
486 _eio_file_unlink_done, 485 _eio_file_unlink_done,
487 _eio_file_unlink_error)) 486 _eio_file_unlink_error))
488 { 487 return NULL;
489 free(l);
490 return NULL;
491 }
492 488
493 return &l->common; 489 return &l->common;
494} 490}
@@ -518,10 +514,7 @@ eio_file_mkdir(const char *path,
518 _eio_file_mkdir, 514 _eio_file_mkdir,
519 _eio_file_mkdir_done, 515 _eio_file_mkdir_done,
520 _eio_file_mkdir_error)) 516 _eio_file_mkdir_error))
521 { 517 return NULL;
522 free(r);
523 return NULL;
524 }
525 518
526 return &r->common; 519 return &r->common;
527} 520}
@@ -551,10 +544,7 @@ eio_file_chmod(const char *path,
551 _eio_file_chmod, 544 _eio_file_chmod,
552 _eio_file_mkdir_done, 545 _eio_file_mkdir_done,
553 _eio_file_mkdir_error)) 546 _eio_file_mkdir_error))
554 { 547 return NULL;
555 free(r);
556 return NULL;
557 }
558 548
559 return &r->common; 549 return &r->common;
560} 550}
@@ -586,10 +576,7 @@ eio_file_chown(const char *path,
586 _eio_file_chown, 576 _eio_file_chown,
587 _eio_file_chown_done, 577 _eio_file_chown_done,
588 _eio_file_chown_error)) 578 _eio_file_chown_error))
589 { 579 return NULL;
590 free(c);
591 return NULL;
592 }
593 580
594 return &c->common; 581 return &c->common;
595} 582}