diff --git a/program/src/rrd_info.c b/program/src/rrd_info.c
index 2f6c07fff78c1806323807084d9e181e9afb337a..5722025384cd1fed366b92434d074124cc4ca237 100644 (file)
--- a/program/src/rrd_info.c
+++ b/program/src/rrd_info.c
next->value.u_int = value.u_int;
break;
case RD_I_STR:
- next->value.u_str = (char*)malloc(sizeof(char) * (strlen(value.u_str) + 1));
- strcpy(next->value.u_str, value.u_str);
+ next->value.u_str = strdup(value.u_str);
break;
case RD_I_BLO:
next->value.u_blo.size = value.u_blo.size;