From 917e83e3910fc0d72f227f3a4bd089051af1e49e Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 5 May 2009 15:02:35 +0000 Subject: [PATCH] Use epicsStrDup for allocation check. --- src/db/dbTest.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/db/dbTest.c b/src/db/dbTest.c index f03ec856e..ee624e615 100644 --- a/src/db/dbTest.c +++ b/src/db/dbTest.c @@ -118,8 +118,7 @@ long epicsShareAPI dbl(const char *precordTypename, const char *fields) if (fields) { char *pnext; - fieldnames = calloc(strlen(fields) + 1, sizeof(char)); - strcpy(fieldnames, fields); + fieldnames = epicsStrDup(fields); nfields = 1; pnext = fieldnames; while (*pnext && (pnext = strchr(pnext,' '))) {