From 8e3b80291c0ecfd26cfdb87a7c9dba4af9dbc10e Mon Sep 17 00:00:00 2001 From: Jan Zeleny Date: Wed, 25 Aug 2010 10:12:23 +0200 Subject: Initialized return value in dp_copy_options() In the very unlikely case dp_copy_options was called with num_options == 0, the return value as well as the left operand of comparison on line 214 would be undefined. Ticket: #577 --- src/providers/data_provider_opts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/providers/data_provider_opts.c') diff --git a/src/providers/data_provider_opts.c b/src/providers/data_provider_opts.c index 98283e430..3433c4d94 100644 --- a/src/providers/data_provider_opts.c +++ b/src/providers/data_provider_opts.c @@ -132,7 +132,7 @@ int dp_copy_options(TALLOC_CTX *memctx, struct dp_option **_opts) { struct dp_option *opts; - int i, ret; + int i, ret = EOK; opts = talloc_zero_array(memctx, struct dp_option, num_opts); if (!opts) return ENOMEM; -- cgit