Skip to content

Commit c8e543d

Browse files
committed
b/f: don't try to log after log cleanup
- removed logging calls that could happen after log cleanup; - make sure log closing is the last thing done on process detach.
1 parent 54746b9 commit c8e543d

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

driver/odbc.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,15 @@ static BOOL driver_init()
4848

4949
static void driver_cleanup()
5050
{
51-
log_cleanup();
5251
connect_cleanup();
52+
log_cleanup();
5353
}
5454

5555
BOOL WINAPI DllMain(
5656
HINSTANCE hinstDLL, // handle to DLL module
5757
DWORD fdwReason, // reason for calling function
5858
LPVOID lpReserved) // reserved
5959
{
60-
//TRACE3(_IN, "pdp", hinstDLL, fdwReason, lpReserved);
61-
6260
// Perform actions based on the reason for calling.
6361
switch (fdwReason) {
6462
// Initialize once for each new process.
@@ -82,12 +80,11 @@ BOOL WINAPI DllMain(
8280

8381
// Perform any necessary cleanup.
8482
case DLL_PROCESS_DETACH:
85-
driver_cleanup();
8683
INFO("process %u dettached.", GetCurrentProcessId());
84+
driver_cleanup();
8785
break;
8886
}
8987

90-
TRACE4(_OUT, "updp", TRUE, hinstDLL, fdwReason, lpReserved);
9188
return TRUE;
9289
}
9390

0 commit comments

Comments
 (0)