From 940e2141ab13727af6323c4d30002f785e466318 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Sat, 25 Oct 2014 12:37:01 +0200 Subject: [PATCH] softwires: avoid unnecessary allocations --- src/script.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/script.c b/src/script.c index 98fc6e9..f350ea7 100644 --- a/src/script.c +++ b/src/script.c @@ -228,6 +228,9 @@ static void s46_to_env(enum odhcp6c_state state, const uint8_t *data, size_t len const char *name = (state == STATE_S46_MAPE) ? "MAPE" : (state == STATE_S46_MAPT) ? "MAPT" : "LW4O6"; + if (len == 0) + return; + char *str; size_t strsize; -- 2.25.1