From: Steven Barth Date: Sat, 25 Oct 2014 10:37:01 +0000 (+0200) Subject: softwires: avoid unnecessary allocations X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=940e2141ab13727af6323c4d30002f785e466318;p=oweals%2Fodhcp6c.git softwires: avoid unnecessary allocations --- 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;