[sr-dev] git:4.2:b103dff8: regex: reset pointer after free to avoid double free if an error occurs