summaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorSrivardhan Hebbar <sri.hebbar@samsung.com>2015-09-08 10:23:42 +0200
committerStefan Schmidt <stefan@osg.samsung.com>2015-09-08 10:23:42 +0200
commit7f7ac6b85209e0bc1040ea801868c79b6a96a55e (patch)
tree9e5c4d198c4939752ef6f1ecec044aa1f21568f0 /src/examples
parentbd15029b3228522aa7793cf945dec323ca33da8d (diff)
eet_example: Fixing memory leak.
Summary: calloc is done 2times, so there is a memory leak. So fixing that. Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com> Reviewers: cedric, stefan_schmidt Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D3032
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/eet/eet-data-file_descriptor_02.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/examples/eet/eet-data-file_descriptor_02.c b/src/examples/eet/eet-data-file_descriptor_02.c
index cba0377458..e0ca00d6fd 100644
--- a/src/examples/eet/eet-data-file_descriptor_02.c
+++ b/src/examples/eet/eet-data-file_descriptor_02.c
@@ -462,7 +462,6 @@ _variant_1_new(const char *v1,
462 return NULL; 462 return NULL;
463 } 463 }
464 464
465 va = calloc(1, sizeof (Example_Variant));
466 va->t.type = eet_mapping[0].name; 465 va->t.type = eet_mapping[0].name;
467 st1 = calloc(1, sizeof (Example_Struct1)); 466 st1 = calloc(1, sizeof (Example_Struct1));
468 _st1_set(st1, atof(v1), atoi(v2), eina_stringshare_add(v3)); 467 _st1_set(st1, atof(v1), atoi(v2), eina_stringshare_add(v3));
@@ -486,8 +485,6 @@ _variant_2_new(const char *v1,
486 return NULL; 485 return NULL;
487 } 486 }
488 487
489 va = calloc(1, sizeof (Example_Variant));
490
491 va->t.type = eet_mapping[1].name; 488 va->t.type = eet_mapping[1].name;
492 489
493 printf("type gets %s\n", va->t.type); 490 printf("type gets %s\n", va->t.type);
@@ -511,7 +508,6 @@ _variant_3_new(const char *v1)
511 return NULL; 508 return NULL;
512 } 509 }
513 510
514 va = calloc(1, sizeof (Example_Variant));
515 va->t.type = eet_mapping[2].name; 511 va->t.type = eet_mapping[2].name;
516 st3 = calloc(1, sizeof (Example_Struct3)); 512 st3 = calloc(1, sizeof (Example_Struct3));
517 _st3_set(st3, atoi(v1)); 513 _st3_set(st3, atoi(v1));