plugin:python: check asprintf() errors

The code was validating the string but the man page for asprintf(3)
says clearly:

If memory allocation wasn't possible, or some other error occurs,
these functions  will return -1, and the contents of strp are undefined.

So, we cannot really rely on the returned string pointer.


Signed-off-by: Federico Vaga <>
Signed-off-by: Steven Rostedt (VMware) <>
1 file changed