[sr-dev] git:master:72e0ebcd: ctl: proper handling of realloc failure to avoid leak