X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Frrd_client.c;fp=src%2Frrd_client.c;h=f271f3db56f25f5906ea1ad11d40e7e879cb47ec;hb=07c12ec4a3094cedd00628d33ca077338c60e96b;hp=3347b82577339a9bc307fc7d149f485a16fdf0af;hpb=2a5dc89618904fdcbc2bd4db19ab3ce1be8fcd7c;p=rrdtool.git diff --git a/src/rrd_client.c b/src/rrd_client.c index 3347b82..f271f3d 100644 --- a/src/rrd_client.c +++ b/src/rrd_client.c @@ -913,8 +913,7 @@ rrd_info_t * rrdc_info (const char *filename) /* {{{ */ break; case RD_I_STR: chomp(s); - info.u_str = (char*)malloc(sizeof(char) * (strlen(s) + 1)); - strcpy(info.u_str,s); + info.u_str = strdup(s); break; case RD_I_BLO: rrd_set_error ("rrdc_info: BLOB objects are not supported");