=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-source-file.c,v retrieving revision 1.8 retrieving revision 1.9 diff -c -r1.8 -r1.9 *** src/usr.bin/tmux/cmd-source-file.c 2010/02/06 17:15:33 1.8 --- src/usr.bin/tmux/cmd-source-file.c 2010/02/06 23:22:27 1.9 *************** *** 1,4 **** ! /* $OpenBSD: cmd-source-file.c,v 1.8 2010/02/06 17:15:33 nicm Exp $ */ /* * Copyright (c) 2008 Tiago Cunha --- 1,4 ---- ! /* $OpenBSD: cmd-source-file.c,v 1.9 2010/02/06 23:22:27 nicm Exp $ */ /* * Copyright (c) 2008 Tiago Cunha *************** *** 89,106 **** cmd_source_file_exec(struct cmd *self, struct cmd_ctx *ctx) { struct cmd_source_file_data *data = self->data; ! char **causes; ! u_int i, ncauses; ! causes = NULL; ! ncauses = 0; ! ! if (load_cfg(data->path, ctx, &ncauses, &causes) != 0) { ! for (i = 0; i < ncauses; i++) { ! ctx->print(ctx, "%s", causes[i]); ! xfree(causes[i]); } ! xfree(causes); } return (0); --- 89,106 ---- cmd_source_file_exec(struct cmd *self, struct cmd_ctx *ctx) { struct cmd_source_file_data *data = self->data; ! struct causelist causes; ! char *cause; ! u_int i; ! ARRAY_INIT(&causes); ! if (load_cfg(data->path, ctx, &causes) != 0) { ! for (i = 0; i < ARRAY_LENGTH(&causes); i++) { ! cause = ARRAY_ITEM(&causes, i); ! ctx->print(ctx, "%s", cause); ! xfree(cause); } ! ARRAY_FREE(&causes); } return (0);