Cleanup: avoid duplicating userspace-probe desc twice
In userspace probe location _copy functions, we duplicate the strings
(e.g. function name, provider name, etc.) before passing those new
strings to the *_create_no_check function. But this function also duplicates
those strings.
To remove this double duplication, we remove the calls to lttng_strndup() in
the _copy functions and pass the pointers to those strings directly to
the _create_no_check functions.
Also, we now don't call open() needlessly when calling the
_create_no_check functions from the _copy functions as we need to
manually set a duplicated fd (using dup(2)) to avoid file unlink race.
Fixes Coverity resource leak issues:
1395196,
1395192,
1395205,
1395211
and
1395214
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>