summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-10-18 13:29:13 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-10-18 13:29:13 -0400
commit8cef6a9724f77b33636db9b2147257843f26e215 (patch)
tree3ad80f79db83393dbe16ce021fcac75572ee4ced
parentd417868c90cca3d6bcbe6fa89ffdfc1cccfa2932 (diff)
tests: fix minor string leaks
Summary: CIDs 1404754, 1401022, 1400965 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10405
-rw-r--r--src/tests/ecore/ecore_test_ecore_file.c8
-rw-r--r--src/tests/eina/eina_test_strbuf.c1
2 files changed, 6 insertions, 3 deletions
diff --git a/src/tests/ecore/ecore_test_ecore_file.c b/src/tests/ecore/ecore_test_ecore_file.c
index 3b6fcff..b897fdd 100644
--- a/src/tests/ecore/ecore_test_ecore_file.c
+++ b/src/tests/ecore/ecore_test_ecore_file.c
@@ -382,8 +382,8 @@ EFL_END_TEST
382 382
383EFL_START_TEST(ecore_test_ecore_file_path) 383EFL_START_TEST(ecore_test_ecore_file_path)
384{ 384{
385 const char *src_dir, *src_file, *dest_file; 385 const char *src_dir, *dest_file;
386 char *dup_dir, *path; 386 char *dup_dir, *path, *src_file;
387 unsigned int ret; 387 unsigned int ret;
388 int fd; 388 int fd;
389 Eina_Bool res; 389 Eina_Bool res;
@@ -440,13 +440,14 @@ EFL_START_TEST(ecore_test_ecore_file_path)
440 440
441 ret = ecore_file_shutdown(); 441 ret = ecore_file_shutdown();
442 fail_if(ret != 0); 442 fail_if(ret != 0);
443 free(src_file);
443} 444}
444EFL_END_TEST 445EFL_END_TEST
445 446
446EFL_START_TEST(ecore_test_ecore_file_monitor) 447EFL_START_TEST(ecore_test_ecore_file_monitor)
447{ 448{
448 Ecore_File_Monitor *mon; 449 Ecore_File_Monitor *mon;
449 const char *src_dir; 450 char *src_dir;
450 const char *file = "EcoreFileDest"; 451 const char *file = "EcoreFileDest";
451 const char *sub_dir[] = {"subdir1", 0}; 452 const char *sub_dir[] = {"subdir1", 0};
452 char dir_name[MAXSIZE] = {'\0'}; 453 char dir_name[MAXSIZE] = {'\0'};
@@ -495,6 +496,7 @@ EFL_START_TEST(ecore_test_ecore_file_monitor)
495 496
496 ret = ecore_file_shutdown(); 497 ret = ecore_file_shutdown();
497 fail_if(ret != 0); 498 fail_if(ret != 0);
499 free(src_dir);
498} 500}
499EFL_END_TEST 501EFL_END_TEST
500 502
diff --git a/src/tests/eina/eina_test_strbuf.c b/src/tests/eina/eina_test_strbuf.c
index 88ffc7f..add3ce0 100644
--- a/src/tests/eina/eina_test_strbuf.c
+++ b/src/tests/eina/eina_test_strbuf.c
@@ -609,6 +609,7 @@ EFL_START_TEST(eina_test_strbuf_release_test)
609 609
610 string = eina_strbuf_release(buf); 610 string = eina_strbuf_release(buf);
611 ck_assert_str_eq(string, "strbuf_release_test"); 611 ck_assert_str_eq(string, "strbuf_release_test");
612 free(string);
612} 613}
613EFL_END_TEST 614EFL_END_TEST
614 615