Commit d6cda56
committed
Fix memory leak: copy bind_address_storage to webserver
The webserver was only copying the raw bind_address pointer but not the
shared_ptr that owns the storage. This caused the memory to be freed
when the temporary create_webserver was destroyed, leaving webserver
with a dangling pointer and causing valgrind to report a leak.1 parent e0a47e3 commit d6cda56
2 files changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
| |||
0 commit comments