summaryrefslogtreecommitdiffstats
path: root/edify/main.c
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2010-02-22 23:46:32 +0100
committerDoug Zongker <dougz@android.com>2010-02-23 00:30:33 +0100
commitc4351c791052ad529a4e83c600b1aa6e6420ea86 (patch)
treecdc534868eb58ea980bcca2fbc8e04b68fd9936c /edify/main.c
parentadd missing includes to fix mac build (maybe) (diff)
downloadandroid_bootable_recovery-c4351c791052ad529a4e83c600b1aa6e6420ea86.tar
android_bootable_recovery-c4351c791052ad529a4e83c600b1aa6e6420ea86.tar.gz
android_bootable_recovery-c4351c791052ad529a4e83c600b1aa6e6420ea86.tar.bz2
android_bootable_recovery-c4351c791052ad529a4e83c600b1aa6e6420ea86.tar.lz
android_bootable_recovery-c4351c791052ad529a4e83c600b1aa6e6420ea86.tar.xz
android_bootable_recovery-c4351c791052ad529a4e83c600b1aa6e6420ea86.tar.zst
android_bootable_recovery-c4351c791052ad529a4e83c600b1aa6e6420ea86.zip
Diffstat (limited to 'edify/main.c')
-rw-r--r--edify/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/edify/main.c b/edify/main.c
index a2b74ad92..855704385 100644
--- a/edify/main.c
+++ b/edify/main.c
@@ -42,11 +42,12 @@ int expect(const char* expr_str, const char* expected, int* errors) {
State state;
state.cookie = NULL;
- state.script = expr_str;
+ state.script = strdup(expr_str);
state.errmsg = NULL;
result = Evaluate(&state, e);
free(state.errmsg);
+ free(state.script);
if (result == NULL && expected != NULL) {
fprintf(stderr, "error evaluating \"%s\"\n", expr_str);
++*errors;