From f4c66f67df49405c9c1fb53bb5de1ff2d7a4b6c2 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Mon, 11 Oct 2010 20:13:08 -0500 Subject: [PATCH] simfs: Don't try to read image cache imsi is null --- src/simfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/simfs.c b/src/simfs.c index 6865230d..0b554868 100644 --- a/src/simfs.c +++ b/src/simfs.c @@ -756,8 +756,10 @@ char *sim_fs_get_cached_image(struct sim_fs *fs, int id) return NULL; imsi = ofono_sim_get_imsi(fs->sim); - phase = ofono_sim_get_phase(fs->sim); + if (imsi == NULL) + return NULL; + phase = ofono_sim_get_phase(fs->sim); path = g_strdup_printf(SIM_IMAGE_CACHE_PATH, imsi, phase, id); TFR(stat(path, &st_buf));