Description of problem: Free the string depending on the ret value of dict_set_dynstr. We need to check if ret value from dict_set_dynstr is -EINVAL. We need to free the string only if this case is satisfied. Some usage analysis of the string obviously needs to be done around the code before doing the above change.