Mercurial > hg > nnchat
comparison main.c @ 677:f40d5613c753
Use th_free_r().
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 30 Dec 2017 04:26:29 +0200 |
parents | c7a24acb3620 |
children | 75daa6ec65df |
comparison
equal
deleted
inserted
replaced
676:cfbc5ddf74e5 | 677:f40d5613c753 |
---|---|
1626 th_free(pattern); | 1626 th_free(pattern); |
1627 pattern = npattern; | 1627 pattern = npattern; |
1628 | 1628 |
1629 if (!again) | 1629 if (!again) |
1630 { | 1630 { |
1631 th_free(previous); | 1631 th_free_r(&previous); |
1632 previous = NULL; | |
1633 } | 1632 } |
1634 } | 1633 } |
1635 | 1634 |
1636 if (!pattern) | 1635 if (!pattern) |
1637 return FALSE; | 1636 return FALSE; |
1914 th_free(path); | 1913 th_free(path); |
1915 return TRUE; | 1914 return TRUE; |
1916 | 1915 |
1917 error: | 1916 error: |
1918 th_free(path); | 1917 th_free(path); |
1919 th_free(win->logFilename); | 1918 th_free_r(&win->logFilename); |
1920 win->logFilename = NULL; | |
1921 if (win->logFile != NULL) | 1919 if (win->logFile != NULL) |
1922 fclose(win->logFile); | 1920 fclose(win->logFile); |
1923 #ifndef TH_PLAT_WINDOWS | 1921 #ifndef TH_PLAT_WINDOWS |
1924 else | 1922 else |
1925 if (logFd >= 0) | 1923 if (logFd >= 0) |
1933 { | 1931 { |
1934 if (win->logFile != NULL) | 1932 if (win->logFile != NULL) |
1935 fclose(win->logFile); | 1933 fclose(win->logFile); |
1936 win->logFile = NULL; | 1934 win->logFile = NULL; |
1937 | 1935 |
1938 th_free(win->logFilename); | 1936 th_free_r(&win->logFilename); |
1939 win->logFilename = NULL; | |
1940 } | 1937 } |
1941 | 1938 |
1942 | 1939 |
1943 BOOL nn_log_reopen(nn_window_t *win) | 1940 BOOL nn_log_reopen(nn_window_t *win) |
1944 { | 1941 { |