summaryrefslogtreecommitdiff
path: root/legacy/eio
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2012-08-20 06:36:55 +0000
committerVincent Torri <vincent.torri@gmail.com>2012-08-20 06:36:55 +0000
commit3a399b6b6a8377868621d08d84505f498fa510fd (patch)
tree11933c950034ca7bd0c3e451155ef9dd9dcb095d /legacy/eio
parent1e5f8e30072031743b6e90640a21232f2f1b46de (diff)
Eio: fix possible mem leak
SVN revision: 75445
Diffstat (limited to 'legacy/eio')
-rw-r--r--legacy/eio/src/lib/eio_single.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/legacy/eio/src/lib/eio_single.c b/legacy/eio/src/lib/eio_single.c
index 4c2b240a35..afdc9135c2 100644
--- a/legacy/eio/src/lib/eio_single.c
+++ b/legacy/eio/src/lib/eio_single.c
@@ -421,7 +421,10 @@ 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 return NULL; 424 {
425 free(s);
426 return NULL;
427 }
425 428
426 return &s->common; 429 return &s->common;
427} 430}
@@ -482,7 +485,10 @@ eio_file_unlink(const char *path,
482 _eio_file_unlink, 485 _eio_file_unlink,
483 _eio_file_unlink_done, 486 _eio_file_unlink_done,
484 _eio_file_unlink_error)) 487 _eio_file_unlink_error))
485 return NULL; 488 {
489 free(l);
490 return NULL;
491 }
486 492
487 return &l->common; 493 return &l->common;
488} 494}
@@ -512,7 +518,10 @@ eio_file_mkdir(const char *path,
512 _eio_file_mkdir, 518 _eio_file_mkdir,
513 _eio_file_mkdir_done, 519 _eio_file_mkdir_done,
514 _eio_file_mkdir_error)) 520 _eio_file_mkdir_error))
515 return NULL; 521 {
522 free(r);
523 return NULL;
524 }
516 525
517 return &r->common; 526 return &r->common;
518} 527}
@@ -542,7 +551,10 @@ eio_file_chmod(const char *path,
542 _eio_file_chmod, 551 _eio_file_chmod,
543 _eio_file_mkdir_done, 552 _eio_file_mkdir_done,
544 _eio_file_mkdir_error)) 553 _eio_file_mkdir_error))
545 return NULL; 554 {
555 free(r);
556 return NULL;
557 }
546 558
547 return &r->common; 559 return &r->common;
548} 560}
@@ -574,7 +586,10 @@ eio_file_chown(const char *path,
574 _eio_file_chown, 586 _eio_file_chown,
575 _eio_file_chown_done, 587 _eio_file_chown_done,
576 _eio_file_chown_error)) 588 _eio_file_chown_error))
577 return NULL; 589 {
590 free(c);
591 return NULL;
592 }
578 593
579 return &c->common; 594 return &c->common;
580} 595}