diff options
Diffstat (limited to 'source3/printing/lpq_parse.c')
-rw-r--r-- | source3/printing/lpq_parse.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/printing/lpq_parse.c b/source3/printing/lpq_parse.c index 50fad6f946..09f630e464 100644 --- a/source3/printing/lpq_parse.c +++ b/source3/printing/lpq_parse.c @@ -125,9 +125,13 @@ static bool parse_lpq_bsd(char *line,print_queue_struct *buf,bool first) char *tok[MAXTOK]; int count = 0; - pstring line2; + TALLOC_CTX *ctx = talloc_tos(); + char *line2 = NULL; - pstrcpy(line2,line); + line2 = talloc_strdup(ctx, line); + if (!line2) { + return false; + } #ifdef OSF1 { |