Commit b21245c
committed
fix(log_router): ensure mutex is created successfully, or else return an error
Check if the mutex (which ensures thread safety) was created
successfully, and return an error if it wasn't. Moved this check to the
top of the <<>> function, so that it doesn't need to clean up allocated
memory.
Since successfully creating the mutex is now a precondition for creating
the list, we can safely remove the NULL checks when using the mutex.1 parent b1458b6 commit b21245c
1 file changed
+9
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
122 | | - | |
123 | | - | |
| 121 | + | |
124 | 122 | | |
125 | 123 | | |
126 | 124 | | |
| |||
244 | 242 | | |
245 | 243 | | |
246 | 244 | | |
247 | | - | |
248 | | - | |
249 | | - | |
| 245 | + | |
250 | 246 | | |
251 | 247 | | |
252 | 248 | | |
| |||
290 | 286 | | |
291 | 287 | | |
292 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
293 | 296 | | |
294 | 297 | | |
295 | 298 | | |
| |||
376 | 379 | | |
377 | 380 | | |
378 | 381 | | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | 382 | | |
386 | 383 | | |
387 | 384 | | |
| |||
0 commit comments