X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Furi.c;h=f64a0de9fb88d24f4980fbce8623289fbd18510a;hp=3550af9755d22c5c0449cc2f11c8cb2657a4d6df;hb=c617c0c651432f9d5ae7adf4c5c1a5fd92ad828e;hpb=bdd88757eedddd53dea46645574f218094573c74 diff --git a/src/common/uri.c b/src/common/uri.c index 3550af975..f64a0de9f 100644 --- a/src/common/uri.c +++ b/src/common/uri.c @@ -342,7 +342,6 @@ ssize_t uri_parse(const char *str_uri, struct lttng_uri **uris) * so we can define the control and data port. */ while (*purl == ':') { - int port; const char *port_b, *port_e; char *port_f; @@ -369,6 +368,8 @@ ssize_t uri_parse(const char *str_uri, struct lttng_uri **uris) port_e = purl; if (port_b != port_e) { + int port; + port_f = utils_strdupdelim(port_b, port_e); if (port_f == NULL) { goto free_error;