search for: cleanup_free_

Displaying 5 results from an estimated 5 matches for "cleanup_free_".

Did you mean: cleanup_free
2017 Mar 10
2
[PATCH 1/2] daemon: generate cleanup handlers for structs
...+"; + + pr "/* Cleanup functions used by CLEANUP_* macros. Do not call\n"; + pr " * these functions directly.\n"; + pr " */\n"; + pr "\n"; + + List.iter ( + fun { s_name = typ; s_cols = cols } -> + pr "void\n"; + pr "cleanup_free_int_%s (void *ptr)\n" typ; + pr "{\n"; + pr " struct guestfs_int_%s *x = (* (struct guestfs_int_%s **) ptr);\n" typ typ; + pr "\n"; + pr " if (x) {\n"; + pr " xdr_free ((xdrproc_t) xdr_guestfs_int_%s, (char *) x);\n&quot...
2018 May 03
1
[PATCH] daemon: fix memory allocation and leaks in OCaml stubs
...+ let uc_typ = String.uppercase_ascii typ in pr "/* Implement RStruct (%S, _). */\n" typ; pr "static guestfs_int_%s *\n" typ; pr "return_%s (value retv)\n" typ; pr "{\n"; - pr " guestfs_int_%s *ret;\n" typ; + pr " CLEANUP_FREE_%s guestfs_int_%s *ret = NULL;\n" uc_typ typ; + pr " guestfs_int_%s *real_ret;\n" typ; pr " value v;\n"; pr "\n"; - pr " ret = malloc (sizeof (*ret));\n"; + pr " ret = calloc (1, sizeof (*ret));\n"; pr " if (ret...
2017 Mar 06
7
[PATCH 0/6] Various Coverity fixes #2
Hi, this patch series fixes few more issues discovered by Coverity. Thanks, Pino Toscano (6): tail: check the return value pf guestfs_set_pgroup daemon: btrfs: check end_stringsbuf return values everywhere java: use cleanup handlers for structs (lists) as return values lib: qemu: improve handling of FILE* p2v: check more return values p2v: fix possible close(-1) issue cat/tail.c
2016 Dec 08
4
[PATCH] generator: Share Common_utils code.
...ng.uppercase shortname); + pr "#define LIBGUESTFS_HAVE_%s 1\n" (String.uppercase_ascii shortname); ) public_functions_sorted; pr " @@ -810,9 +812,9 @@ and generate_internal_frontend_cleanups_h () = List.iter ( fun { s_name = name } -> - pr "#define CLEANUP_FREE_%s \\\n" (String.uppercase name); + pr "#define CLEANUP_FREE_%s \\\n" (String.uppercase_ascii name); pr " __attribute__((cleanup(guestfs_int_cleanup_free_%s)))\n" name; - pr "#define CLEANUP_FREE_%s_LIST \\\n" (String.uppercase name); + pr &q...
2015 Feb 14
2
[PATCH 0/2] Change guestfs__*
libguestfs has used double and triple underscores in identifiers. These aren't valid for global names in C++. (http://stackoverflow.com/a/228797) These large but completely mechanical patches change the illegal identifiers to legal ones. Rich.