diff --git a/base/applications/regedit/regproc.c b/base/applications/regedit/regproc.c index c17221df5ae..41ac7c6be8b 100644 --- a/base/applications/regedit/regproc.c +++ b/base/applications/regedit/regproc.c @@ -1392,7 +1392,7 @@ BOOL export_registry_key(WCHAR *file_name, WCHAR *reg_key_name, DWORD format) if (file) { fclose(file); } - HeapFree(GetProcessHeap(), 0, reg_key_name); + HeapFree(GetProcessHeap(), 0, reg_key_name_buf); HeapFree(GetProcessHeap(), 0, val_name_buf); HeapFree(GetProcessHeap(), 0, val_buf); HeapFree(GetProcessHeap(), 0, line_buf);