X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=server-src%2Fcmdline.c;h=892b6a3c6b600120081ff99388febf2426ebfccf;hb=2627875b7d18858bc1f9f7652811e4d8c15a23eb;hp=816c19488a71260fffe5cb8db56826ced6f5e731;hpb=fb2bd066c2f8b34addafe48d62550e3033a59431;p=debian%2Famanda diff --git a/server-src/cmdline.c b/server-src/cmdline.c index 816c194..892b6a3 100644 --- a/server-src/cmdline.c +++ b/server-src/cmdline.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005 Zmanda Inc. All Rights Reserved. + * Copyright (c) 2005-2008 Zmanda Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published @@ -14,8 +14,8 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * Contact information: Zmanda Inc, 505 N Mathlida Ave, Suite 120 - * Sunnyvale, CA 94085, USA, or: http://www.zmanda.com + * Contact information: Zmanda Inc, 465 S Mathlida Ave, Suite 300 + * Sunnyvale, CA 94086, USA, or: http://www.zmanda.com * * Author: Dustin J. Mitchell */ @@ -39,8 +39,7 @@ dumpspec_new( { dumpspec_t *rv; - rv = calloc(1, sizeof(*rv)); - if (!rv) return NULL; + rv = g_new0(dumpspec_t, 1); if (host) rv->host = stralloc(host); if (disk) rv->disk = stralloc(disk); if (datestamp) rv->datestamp = stralloc(datestamp); @@ -241,7 +240,10 @@ cmdline_match_holding( for (hi = holding_files; hi != NULL; hi = hi->next) { /* TODO add level */ if (!holding_file_get_dumpfile((char *)hi->data, &file)) continue; - if (file.type != F_DUMPFILE) continue; + if (file.type != F_DUMPFILE) { + dumpfile_free_data(&file); + continue; + } for (li = dumpspec_list; li != NULL; li = li->next) { de = (dumpspec_t *)(li->data); if (de->host && de->host[0] && !match_host(de->host, file.name)) continue; @@ -250,6 +252,7 @@ cmdline_match_holding( matching_files = g_slist_append(matching_files, g_strdup((char *)hi->data)); break; } + dumpfile_free_data(&file); } g_slist_free_full(holding_files);