summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2015-03-18 15:23:39 +0100
committerBoris Faure <billiob@gmail.com>2015-03-18 15:23:39 +0100
commit4abdf4b327e340ddde6316f5073f96db18f0385f (patch)
treeb8d50c7445e7fe54413e020dc078832baac01e03 /src
parent73c9e827772cc68a9d510d7d89d55308da518e1d (diff)
code cleanup: s/if (X) free(X);/free(X);/
Diffstat (limited to 'src')
-rw-r--r--src/bin/termio.c2
-rw-r--r--src/bin/termpty.c11
-rw-r--r--src/bin/tyls.c10
3 files changed, 8 insertions, 15 deletions
diff --git a/src/bin/termio.c b/src/bin/termio.c
index 50818a6..64e4f44 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -5343,7 +5343,7 @@ _smart_pty_command(void *data)
5343 termpty_block_insert(sd->pty, repch, blk); 5343 termpty_block_insert(sd->pty, repch, blk);
5344 } 5344 }
5345 } 5345 }
5346 if (link) free(link); 5346 free(link);
5347 EINA_LIST_FREE(strs, pp) free(pp); 5347 EINA_LIST_FREE(strs, pp) free(pp);
5348 } 5348 }
5349 return; 5349 return;
diff --git a/src/bin/termpty.c b/src/bin/termpty.c
index 8c035e6..c1590f2 100644
--- a/src/bin/termpty.c
+++ b/src/bin/termpty.c
@@ -503,8 +503,8 @@ termpty_new(const char *cmd, Eina_Bool login_shell, const char *cd,
503 termpty_save_register(ty); 503 termpty_save_register(ty);
504 return ty; 504 return ty;
505err: 505err:
506 if (ty->screen) free(ty->screen); 506 free(ty->screen);
507 if (ty->screen2) free(ty->screen2); 507 free(ty->screen2);
508 if (ty->fd >= 0) close(ty->fd); 508 if (ty->fd >= 0) close(ty->fd);
509 if (ty->slavefd >= 0) close(ty->slavefd); 509 if (ty->slavefd >= 0) close(ty->slavefd);
510 free(ty); 510 free(ty);
@@ -577,10 +577,9 @@ termpty_free(Termpty *ty)
577 free(ty->back); 577 free(ty->back);
578 ty->back = NULL; 578 ty->back = NULL;
579 } 579 }
580 if (ty->screen) free(ty->screen); 580 free(ty->screen);
581 if (ty->screen2) free(ty->screen2); 581 free(ty->screen2);
582 if (ty->buf) free(ty->buf); 582 free(ty->buf);
583 memset(ty, 0, sizeof(Termpty));
584 free(ty); 583 free(ty);
585} 584}
586 585
diff --git a/src/bin/tyls.c b/src/bin/tyls.c
index f381b32..8469ff7 100644
--- a/src/bin/tyls.c
+++ b/src/bin/tyls.c
@@ -483,16 +483,10 @@ fileicon(const char *path)
483 name = ecore_file_file_get(path); 483 name = ecore_file_file_get(path);
484 if (name) 484 if (name)
485 { 485 {
486 char *ts;
487
488 if (ecore_file_is_dir(path)) isdir = EINA_TRUE; 486 if (ecore_file_is_dir(path)) isdir = EINA_TRUE;
489 ts = ecore_file_readlink(path); 487 free(ecore_file_readlink(path));
490 if (ts)
491 {
492 free(ts);
493 }
494 if (ecore_file_can_exec(path)) isexec = EINA_TRUE; 488 if (ecore_file_can_exec(path)) isexec = EINA_TRUE;
495 489
496 if (isdir) return filematch(name, dmatch); 490 if (isdir) return filematch(name, dmatch);
497 else if (isexec) return filematch(name, xmatch); 491 else if (isexec) return filematch(name, xmatch);
498 else return filematch(name, fmatch); 492 else return filematch(name, fmatch);