[sr-dev] git:master:5418f380: domain: use same condition to alloc and free local variable