-
- Downloads
Merge all returns paths from dispatcher into single path
The dispatcher functions have numerous places where they return to the caller. This leads to duplicated cleanup code, often resulting in memory leaks. It makes it harder to ensure that errors are dispatched before freeing objects, which may overwrite the original error. The standard pattern is now remoteDispatchXXX(...) { int rv = -1; .... if (XXX < 0) goto cleanup; ... if (XXXX < 0) goto cleanup; ... rv = 0; cleanup: if (rv < 0) remoteDispatchError(rerr); ...free all other stuff.. return rv; } * daemon/remote.c: Centralize all cleanup paths * daemon/stream.c: s/remoteDispatchConnError/remoteDispatchError/ * daemon/dispatch.c, daemon/dispatch.h: Replace remoteDispatchConnError with remoteDispatchError removing unused virConnectPtr
Source diff could not be displayed: it is too large. Options to address this: view the blob.
-
mentioned in commit 455de121
-
mentioned in commit 2f34eae9
-
mentioned in commit 9579f457
-
mentioned in commit a413bc2d
-
mentioned in commit 95983486
-
mentioned in commit 118d26dc
-
mentioned in commit 6d1acf71
-
mentioned in commit 2bfbf7a1
-
mentioned in commit f229972f
-
mentioned in commit 10d159fe
Please register or sign in to comment