summaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-10-18 13:30:10 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-10-18 13:30:10 -0400
commit20b592cef7f231378f67e0f78d5670144b4d3693 (patch)
tree654a5f275f58ca0b68e5c960f22ad4e5225fc65a /src/examples
parentc12008b4d0118232aca3f45e3e77137acef75078 (diff)
fix various trivial null derefs
Summary: CIDs 1401081, 1401044, 1400983, 1400960, 1400927, 1400799, 1396946, 1396944, 1383851, 1383847, 1382211, 1379921, 1379921 Reviewers: cedric Reviewed By: cedric Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10452
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/elementary/performance/graphical.c5
-rw-r--r--src/examples/elementary/performance/performance.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/src/examples/elementary/performance/graphical.c b/src/examples/elementary/performance/graphical.c
index c3a87683b7..d68d865a80 100644
--- a/src/examples/elementary/performance/graphical.c
+++ b/src/examples/elementary/performance/graphical.c
@@ -509,6 +509,11 @@ _xml_attr_data(void *data EINA_UNUSED, const char *key, const char *value)
509 globalGraphical.model_path = strdup(value);/*Don't forget update UI*/ 509 globalGraphical.model_path = strdup(value);/*Don't forget update UI*/
510 tmp = strdup(globalGraphical.model_path); 510 tmp = strdup(globalGraphical.model_path);
511 a = strrchr(tmp,'.'); 511 a = strrchr(tmp,'.');
512 if (!a)
513 {
514 free(tmp);
515 return EINA_FALSE;
516 }
512 format = malloc(sizeof (char) * (strlen(a) - 1)); 517 format = malloc(sizeof (char) * (strlen(a) - 1));
513 for (i = 0; i <= (int)strlen(a) - 1; i++) 518 for (i = 0; i <= (int)strlen(a) - 1; i++)
514 format[i] = a[i + 1]; 519 format[i] = a[i + 1];
diff --git a/src/examples/elementary/performance/performance.c b/src/examples/elementary/performance/performance.c
index 7508a93de1..75f330ccc4 100644
--- a/src/examples/elementary/performance/performance.c
+++ b/src/examples/elementary/performance/performance.c
@@ -516,6 +516,11 @@ _load_mesh(void *data EINA_UNUSED, Evas_Object *obj, void *event_info)
516 /*Get extension of file*/ 516 /*Get extension of file*/
517 tmp = strdup(event_info); 517 tmp = strdup(event_info);
518 a = strrchr(tmp,'.'); 518 a = strrchr(tmp,'.');
519 if (!a)
520 {
521 free(tmp);
522 return;
523 }
519 format = malloc(sizeof (char) * (strlen(a) - 1)); 524 format = malloc(sizeof (char) * (strlen(a) - 1));
520 for (i = 0; i <= (int)strlen(a) - 1; i++) 525 for (i = 0; i <= (int)strlen(a) - 1; i++)
521 format[i] = a[i + 1]; 526 format[i] = a[i + 1];