Commit 45e8fdd
Adam Hockley
Fix crash in /rehash motd - correct order of operations
Fixed the order to match cache_user_motd() - stat() must be called
before free_cachefile() to avoid potential race conditions or crashes.
The stat() call should happen first to get file metadata, then free
and reload the cache.1 parent 48d4fde commit 45e8fdd
1 file changed
+3
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
107 | 106 | | |
108 | 107 | | |
109 | 108 | | |
110 | 109 | | |
111 | 110 | | |
112 | 111 | | |
113 | 112 | | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
| 113 | + | |
122 | 114 | | |
123 | 115 | | |
124 | 116 | | |
| |||
129 | 121 | | |
130 | 122 | | |
131 | 123 | | |
| 124 | + | |
| 125 | + | |
132 | 126 | | |
133 | 127 | | |
134 | 128 | | |
| |||
0 commit comments