search for: guestfs_int_free_string_list

Displaying 20 results from an estimated 68 matches for "guestfs_int_free_string_list".

2019 Dec 19
1
[PATCH] daemon: reorder internal static libs to fix linking
...g to the end of the command line. This currently does not cause failures, however it "just works" because of the tricky situation set up. The situation is the following: 1) common/utils contains few utility sources: one of them is utils.c, which contains various functions -- for example guestfs_int_free_string_list and guestfs_int_drive_name --, it is built as utils.o, and bundled in the static library libutils.a 2) common/mlutils builds a OCaml library with bindings for some utility functions in libutils.a, in particular guestfs_int_drive_name (but not guestfs_int_free_string_list); there are two versions o...
2017 Mar 18
0
[PATCH] python: check return value of Python APIs
...eturn dict;\n"; pr "};\n"; @@ -517,16 +564,20 @@ and generate_python_actions actions () = pr " if (py_r == NULL) goto out;\n"; | RStringList _ -> pr " py_r = guestfs_int_py_put_string_list (r);\n"; - pr " guestfs_int_free_string_list (r);\n" + pr " guestfs_int_free_string_list (r);\n"; + pr " if (py_r == NULL) goto out;\n"; | RStruct (_, typ) -> pr " py_r = guestfs_int_py_put_%s (r);\n" typ; - pr " guestfs_free_%s (r);\n" typ +...
2017 Apr 25
1
[Bug #1406906] [PATCH] python: fix segmentation fault when setting non UTF-8 strings
...eturn dict;\n"; pr "};\n"; @@ -517,16 +564,20 @@ and generate_python_actions actions () = pr " if (py_r == NULL) goto out;\n"; | RStringList _ -> pr " py_r = guestfs_int_py_put_string_list (r);\n"; - pr " guestfs_int_free_string_list (r);\n" + pr " guestfs_int_free_string_list (r);\n"; + pr " if (py_r == NULL) goto out;\n"; | RStruct (_, typ) -> pr " py_r = guestfs_int_py_put_%s (r);\n" typ; - pr " guestfs_free_%s (r);\n" typ +...
2017 May 11
1
[PATCH v2] RHBZ#1406906: check return value of Python object functions
..."#endif\n"; pr "\n"; @@ -472,16 +498,20 @@ and generate_python_actions actions () = pr " if (py_r == NULL) goto out;\n"; | RStringList _ -> pr " py_r = guestfs_int_py_put_string_list (r);\n"; - pr " guestfs_int_free_string_list (r);\n" + pr " guestfs_int_free_string_list (r);\n"; + pr " if (py_r == NULL) goto out;\n"; | RStruct (_, typ) -> pr " py_r = guestfs_int_py_put_%s (r);\n" typ; - pr " guestfs_free_%s (r);\n" typ +...
2018 Jun 15
1
[PATCH] fuse: fix build when not available
...+) diff --git a/lib/handle.c b/lib/handle.c index bc45d29b2..a47aaafab 100644 --- a/lib/handle.c +++ b/lib/handle.c @@ -399,7 +399,9 @@ guestfs_close (guestfs_h *g) free (g->hv); free (g->backend); free (g->backend_data); +#if HAVE_FUSE free (g->localmountpoint); +#endif guestfs_int_free_string_list (g->backend_settings); free (g->append); guestfs_int_free_error_data_list (g); -- 2.17.1
2019 Dec 20
3
[common/libguestfs PATCH 0/2] Fix OCaml/Python linking
Make sure they can build also in no as-neede setups. Pino Toscano (1): utils: split string list functions in own file build: use split stringlist functions from common/utils utils/Makefile.am | 2 + utils/guestfs-stringlists-utils.h | 30 +++++ utils/guestfs-utils.h | 7 +- utils/stringlists-utils.c | 197 ++++++++++++++++++++++++++++++ utils/utils.c
2015 Jun 25
4
URI Handling Patch
I have written a patch (please see attached) which fixes both of these bugs: https://bugzilla.redhat.com/show_bug.cgi?id=1092583 https://bugzilla.redhat.com/show_bug.cgi?id=1232477 By default, when saving a URI using xmlSaveUri it escapes everything in the URI. QEMU doesn't want anything escaped, so now I unescape everything after the URI is generated. Unfortunately there's no flag to
2015 Jun 26
0
Re: URI Handling Patch
...,12 +178,20 @@ parse (const char *arg, char **path_ret, char **protocol_ret, > } > } > > + if (asprintf(&path, "%s?%s", uri->path, uri->query_raw) == -1) { > + perror ("asprintf: path + query_raw"); > + free (*protocol_ret); > + guestfs_int_free_string_list (*server_ret); > + free (*username_ret); > + free (*password_ret); > + return -1; > + } 'path' created here is leaked. Also, this needs to take into account that either uri->path or uri->query_raw may be null. > /* We may have to adjust the path depending...
2023 Jan 30
1
[p2v PATCH 09/11] gui: expose "p2v.output.misc" (-oo)
On Mon, Jan 30, 2023 at 03:22:26PM +0100, Laszlo Ersek wrote: > + str = gtk_entry_get_text (GTK_ENTRY (oo_entry)); > + guestfs_int_free_string_list (config->output.misc); > + config->output.misc = guestfs_int_split_string (',', str); My concern here is that someone is going to put "foo=bar, baz=1" in this field, and it will improperly split above. So maybe a bit of trimming on the resulting array? > + if (con...
2017 May 09
1
[PATCH] RHBZ#1406906: check return value of Python object functions
..."#endif\n"; pr "\n"; @@ -472,16 +498,20 @@ and generate_python_actions actions () = pr " if (py_r == NULL) goto out;\n"; | RStringList _ -> pr " py_r = guestfs_int_py_put_string_list (r);\n"; - pr " guestfs_int_free_string_list (r);\n" + pr " guestfs_int_free_string_list (r);\n"; + pr " if (py_r == NULL) goto out;\n"; | RStruct (_, typ) -> pr " py_r = guestfs_int_py_put_%s (r);\n" typ; - pr " guestfs_free_%s (r);\n" typ +...
2019 Jan 22
3
[PATCH 0/2] python: fixes for Python 3
A couple of fixes for Python 3 to the Python binding. Unfortunately a behaviour change is needed, although it fixes broken types used. Pino Toscano (2): python: fix call of Python handlers of events python: change return type for RBufferOut with Python 3 (RHBZ#1661871) generator/python.ml | 4 ++++ python/handle.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) -- 2.20.1
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.
2017 May 06
5
[Bug 1406906] [PATCH 0/3] Fix segmentation fault in Python bindings
This series addresses the issue where non UTF8 file names in a guest image lead to libguestfs segfault with Python 3 APIs. The core issue is the APIs are not checking the return value when constructing a new PyObject. Therefore NULL pointers are added to Python collections (lists and dictionaries) crashing the application. Few notes regarding the comments on the previous patch. - Added a
2017 Mar 16
0
[PATCH 1/4] p2v: Pass host CPU details to virt-v2v.
...--git a/p2v/config.c b/p2v/config.c index 054b07c..f9f610c 100644 --- a/p2v/config.c +++ b/p2v/config.c @@ -95,6 +95,8 @@ free_config (struct config *c) free (c->identity_url); free (c->identity_file); free (c->guestname); + free (c->cpu.vendor); + free (c->cpu.model); guestfs_int_free_string_list (c->disks); guestfs_int_free_string_list (c->removable); guestfs_int_free_string_list (c->interfaces); @@ -132,10 +134,20 @@ print_config (struct config *config, FILE *fp) config->guestname ? config->guestname : "none"); fprintf (fp, "vcpus . . ....
2018 Jun 29
3
p2v: Various cleanups.
These are a prelude to fixing https://bugzilla.redhat.com/show_bug.cgi?id=1590220 A lot of the virt-p2v configuration code was duplicated manually. These changes make sure that most of it is generated. Rich.
2020 Jun 01
1
[PATCH] erlang: Port to libei for Erlang 23
...);\n"; + pr " if (ei_x_encode_string (retbuff, r) != 0) return -1;\n"; pr " free (r);\n"; - pr " return rt;\n" | RStringList _ -> - pr " ETERM *rt = make_string_list (r);\n"; - pr " guestfs_int_free_string_list (r);\n\n"; - pr " return rt;\n" + pr " if (make_string_list (retbuff, r) != 0) return -1;\n"; + pr " guestfs_int_free_string_list (r);\n" | RStruct (_, typ) -> - pr " ETERM *rt = make_%s (r);\n" typ;...
2018 May 02
0
[PATCH v2] fuse: mount_local: Fix crash when called from Java binding.
...*/ return 0; diff --git a/lib/handle.c b/lib/handle.c index 449ab42a6..bc45d29b2 100644 --- a/lib/handle.c +++ b/lib/handle.c @@ -399,6 +399,7 @@ guestfs_close (guestfs_h *g) free (g->hv); free (g->backend); free (g->backend_data); + free (g->localmountpoint); guestfs_int_free_string_list (g->backend_settings); free (g->append); guestfs_int_free_error_data_list (g); -- 2.17.0
2019 Jan 22
0
[PATCH 2/2] python: change return type for RBufferOut with Python 3 (RHBZ#1661871)
...ions. --- generator/python.ml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/generator/python.ml b/generator/python.ml index a70faec8c..c10adcb69 100644 --- a/generator/python.ml +++ b/generator/python.ml @@ -511,7 +511,11 @@ and generate_python_actions actions () = pr " guestfs_int_free_string_list (r);\n"; pr " if (py_r == NULL) goto out;\n"; | RBufferOut _ -> + pr "#if PY_MAJOR_VERSION >= 3\n"; + pr " py_r = PyBytes_FromStringAndSize (r, size);\n"; + pr "#else\n"; pr " py...
2019 Jan 22
0
[PATCH v2 2/2] python: change types for RBufferOut/FBuffer with Python 3 (RHBZ#1661871)
...pr "#endif\n"; pr " if (value == NULL)\n"; pr " goto err;\n"; pr " PyDict_SetItemString (dict, \"%s\", value);\n" name; @@ -511,7 +516,11 @@ and generate_python_actions actions () = pr " guestfs_int_free_string_list (r);\n"; pr " if (py_r == NULL) goto out;\n"; | RBufferOut _ -> + pr "#if PY_MAJOR_VERSION >= 3\n"; + pr " py_r = PyBytes_FromStringAndSize (r, size);\n"; + pr "#else\n"; pr " py...
2015 Feb 14
0
[PATCH] python: Call PyErr_Clear() on non-error paths out of the Python bindings.
...quot;; pr "#endif\n"; - pr " free (r);\n" + pr " free (r);\n"; + pr " if (py_r == NULL) goto out;\n"; | RStringList _ -> pr " py_r = put_string_list (r);\n"; pr " guestfs_int_free_string_list (r);\n" @@ -492,10 +495,18 @@ put_table (char * const * const argv) pr "#else\n"; pr " py_r = PyBytes_FromStringAndSize (r, size);\n"; pr "#endif\n"; - pr " free (r);\n" + pr " free (r);\n&q...