Record the original strdup-ed value so we can free it afterwards. Fixes: #935
Attach a file by drag & drop or click to upload