Hugh McMaster : regedit: Free the buffer and reset data information on error and after setting the value.