summaryrefslogtreecommitdiff
path: root/src/providers
diff options
context:
space:
mode:
authorJan Zeleny <jzeleny@redhat.com>2010-08-25 10:12:23 +0200
committerStephen Gallagher <sgallagh@redhat.com>2010-09-02 12:23:19 -0400
commit8e3b80291c0ecfd26cfdb87a7c9dba4af9dbc10e (patch)
tree56f332a04c67ea9b3101e813eccbb7b721470cce /src/providers
parent93a69e1d88448ebf18ba5c103fe9e8d3ac7ca2e9 (diff)
downloadsssd-8e3b80291c0ecfd26cfdb87a7c9dba4af9dbc10e.tar.gz
sssd-8e3b80291c0ecfd26cfdb87a7c9dba4af9dbc10e.tar.bz2
sssd-8e3b80291c0ecfd26cfdb87a7c9dba4af9dbc10e.zip
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
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/data_provider_opts.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/providers/data_provider_opts.c b/src/providers/data_provider_opts.c
index 98283e43..3433c4d9 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;